Clarity and flavor are sometimes correlated, sometimes not. It depends on the beer style. For example, hefeweizens and IPAs are almost always going to be hazy (from yeast and oils extracted during dry hopping, respectively), but something like a German Pils, American Lager, Koelsch, etc. tastes best when they are crystal clear.
As many people have already pointed out with their excellent advice, time is your best ally when making many types of beer, especially if you are still a beginner and don't have a lot of experience yet. But you may miss the "peak flavor window" in some beer styles by fermenting/conditioning the beer for two months. That's why it is important to learn about proper yeast pitching rates, aeration and fermentation temperature control early in your brewing "career", because once your process is fine-tuned, you can get most beers from kettle to tap in 3 weeks or less. Since that doesn't allow gravity a lot of time to do its thing, finings are often added to speed up the clarification process. I find Whirlfloc in the boil (a potent purified Irish Moss) and Isinglass (acidified fish swim bladders; works similar to gelatin but is more potent) on the cold side to be very effective in most situations. There are many other excellent fining agents available on the market that take care of most clarity issues you may come across. Others I have used are Pectic enzyme (in fruit/vegetable beers), White Labs Clarity-Ferm, gelatin, Chitosan, Kieselsol, Bentonite, and probably a couple of others I cannot remember.