A few posts ago, I distinguished branding vs marketing, and that seems like a good segue to slogans and taglines, as they are very important to branding, and if they thought more along the lines of general marketing than branding, the results are usually less-than-stellar.
First things first...what's the difference between a slogan and a tagline? A tagline is for a company as a whole, and ideally, is immutable and unchanging. This means a tagline is even more branding than a slogan as it should not, unless it is an emergency, change. Disneyland will never stop being "The happiest place on Earth" unless something drastic happens that requires a change.
Similarly, Nike will never stop encouraging "Just Do It" until either the sun burns out or they desperately need to change their image.
Slogans can be altered, but they should still reflect the company's product. Mars Incorporated has lots of products, but people associate M&Ms with their slogan, the promise that they "melt in your mouth, not in your hand."
So what makes a good slogan/tagline? Just look at the above examples. They are memorable, unique, and most importantly, draw positive associations about their company/product.
The really important thing to take home here is that slogans shouldn't be rushed or forced. They are easy to remember, but that also means they are hard to forget. Don't cut corners making one or you just may be remembered for the wrong things, or forgotten despite having the right things.