There are two answers for this, one centered around character concept, and one centered around efficiency.
Obviously, certain character concepts might call for a larger number of skills that the PC in question can afford to max out. Similarly, some character concepts don't require a PC to be experts in narrow fields. In those cases, spread the skill points around. In my case, I use this idea most for knowledge skills: my mystic theurge is an expert at a few Knowledge skills, but he has the rest at an only moderate level.
Efficiency- and effectiveness-wise, for most skills, it's better to max them out, because generally the uses a character has for skills grow more difficult as the character gains power. (As one very obvious example, Search DCs for traps are directly related to the traps' CR, which is almost always tied the the heroes' CR.)
In some cases, though, a few ranks in a skill will tend to be enough for the uses a character needs. For instance, if all you want to be able to do with Craft (weaponsmith) is determine if discovered weapons are masterwork, you only need a few ranks in the skill. As another example, if you never plan to tumble through an enemy's space, you can stop increasing Tumble once you reliably can achieve DC 15. (For me, in that case, "reliably" is usually +14.)
Finally, some DMs use optional or house rules (or just seat-of-the-pants "fun rules") that tie the success and flashiness of success to the skill check result. Knowing if your DM does that, or intends to do that, will impact on your decision.
(The weirdest thing just happened. As I was typing that last sentence, a tiny spark jumped out of my keyboard from between the F and G keys. I've never seen anything like that before. But I digress.)
Generally, when I'm creating a PC or NPC at a low-level, I max out all skills. If I'm creating at a higher level, I max out half my skills, and put half-max ranks into twice as many other skills. (Which skills get maxed and which don't still get decided as above.) As a quick-and-dirty compromise, it works pretty well.