There are only a few ways you can really mess up a beer that is made from a good recipe. A lot of it has to do with how you handle your beer once you turn off your flame and begin cooling your wort. Now for those advanced brewers out there, this post is going to be a little boring, but after having recently joined the team at my LHBS, I think it's important to share some basic principles in how to make your good beer great and that starts with having equipment that is clean and sanitized.
Many batches go wrong because of a lack of clean and sanitized fermentation equipment. Once you've begun cooling your wort it is no longer in a sanitized state. At that point anything that touches your wort must be treated with sanitizer. There is no all-in-one cleanser and sanitizer. So in order to make certain that your equipment is not just clean but also sanitized requires a 2-step process in my brew house. John LaPolla co-owner of Bitter and Esters, has a saying I've heard him repeat in his brewing classes, "You cannot sanitize dirt." So, once I've emptied a fermenter I add 2 tablespoons of Five Star Chemicals' Powdered Brewers Wash (PBW) to 5 gallons of hot water. I let it sit for about 30 minutes allowing the combination of heat and PBW to loosen the dried krausen remnants before giving a gentle scrub and a rinse. A bonus use for PBW is that it makes an excellent beer bottle label remover. Just soak the bottles in the same solution ratio and temperature for 30 minutes and all but the most stubborn labels simply slide off. (I'm looking at you, Southern Tier.)
The downside to PBW is the price. It is more expensive than other cleaners but, in my opinion, it is well worth the price point given how effective it is at removing even the most stubborn gunk. If you want to save the bucks, there are a few options available. You can mix a cleaner (like Oxiclean Free or Sun Oxygen Cleaner) with TSP/90 (Sodium Metasilicate) in a 70/30 ratio. It's not a perfect match, and you will still have to deal with scaling if you have hard water, but it's fairly effective if you need to save that money for your next brew.
The next step is sanitation. Add 1 oz of Five Star Chemicals' Star San, a concentrated phosphoric acid based sanitizer readily available at your LHBS, to 5 gallons of water in the fermenter and let it sit for at least 1 minute. When you empty the fermenter, save the sanitizer in a food grade bucket and seal with a lid (or a spare keg, if you have one handy). That sanitizer can be used weeks later when you package (bottle or keg) your beer. You can also keep a spray bottle of the solution handy while you're brewing, transferring, and packaging. A small amount of star san covering the whole surface is enough to do the trick.
One more thing about Star San. The solution will get foamy and some of it will remain on your fermentation equipment. Do not rinse this foam. A common phrase you'll hear from those in the know is "don't fear the foam". In small quantities it doesn't affect the taste of your beer and is not harmful. Rinsing after you've sanitized can reintroduce bacteria to your fermentation equipment negating the whole process. I repeat, do not fear the foam.
Another sanitizer that you can use is Io Star Sanitizer, an iodine based sanitizer. Used in its proper concentration, Io Star can be used as a no-rinse sanitizer as well, but you have to be careful with the solution ratio as iodine can impart flavor to your beer if too much is used. Also in high concentration, it can stain your plastic parts and tubing but that is mostly a cosmetic issue. Io Star is also available from Five Star Chemicals, and I swear they're not a sponsor!
Finally, always inspect your fermenters once they are clean and dried. Even the smallest scratch in your plastic can be a place where bacteria can grow and, unless you're intentionally making a sour beer, you don't want bugs fighting with your yeast for sugars. If you notice an off-flavor in your beer and see a scratch in your fermenting bucket your best bet is to throw it out and buy a new fermenter.
Following these and other better brewing practices (like using a stir plate) will ensure that your yeast has the proper environment for the feast you've so lovingly made for them. And happy healthy yeast properly housed in an anaerobic environment (at the right temperature) that is both clean and sanitized will make great beer each time.