I leave most beers in the primary for 3 weeks, but some beers are better drank fresh: hefeweizens and some pale ales/IPA's for instance. Many people will say though that 3 weeks is still fine for even those beers. I find hefeweizens get too dried out and clear if I leave them in the primary that long.
In the case of lagers, the length of the primary is tied to the progression of the fermentation, so each beer will be different.