I tend to prefer 5 level classse, because they don't completely consume a character. However, the answer should really be whatever the minimum # of levels needed to properly express the idea. Whether it's 5, or 10, or 3 like the Wayfarer Guide.
I don't really like boring prestige classes in which each level grants an additional per day of a power, or a minor upgrade. How boring. For example, I consider many of the Sword and Fist classes guilty of this. Look at the devoted defender. IIRC, it has 3 abilities: Harm's way, deflect attack, and defensive strike. After level 3, you get nothing new. Yet it takes 10 levels because the designers felt the need to stretch it out for some reason. The weapon master, with all the levels in which the character gets Ki critical and Ki damage, seems very boring as well. However, it at least has otehr stuff like whirlwind and improved critical. If the pre-reqs were raised a bit, then it could probably be shortened too.