Both as a GM and as a player, one of the things that always keeps my attention, and one of the things I strive for very hard in any game I play in involves maintaining player balance relative to each other. In other words, the relative power level of the PCs against each other. If you have players who are obviously lacking or lagging behind; players who feel like what they do is of less consequence than what other players do; players whose characters never seem to have the limelight or do their alleged "job" worse than another party member, it's a bad situation. That player can quickly become unhappy with their character and concept, and may lose interest in the game.
This problem can become exasperated even more if the players in groups take different approaches to building characters - if one player is creating a fighter that is intended to be moderately balanced with a sword-and-shield style, and someone else makes a fighter that is min-maxed to the hilt with a two-handed style, the first player will probably feel a bit marginalized. Another character in the party has the same role as him and simply does it better. The fighter's primary job, is, after all, to fight. So when the min-maxed character with the higher strength and constitution manages to hit harder and stay in longer, the extra skill point and bonus to wisdom-based skills that the balanced character had suddenly seems relatively inconsequential. And this is true for all classes, not just pure fighters.
In a game like D&D and its variants, combat is ultimately what determines your overall usefulness. With the vast majority of the text in the books (at least 3.5 and PF) being dedicated to combat, along with the vast majority of class abilities, spells, and feats, it quickly becomes clear that if you can't pull your weight in combat, regardless of anything else you do, your build will be somewhat unsatisfactory. Everyone else will be contributing and managed to pull off great spell placement with a high DC that swings a fight, or a timely critical hit that brings a cheer from the table, the character lacking in his combat ability will simply not be able to elicit those kinds of great moments.
In my pursuit to find out which classes need to be watched out for and which classes can be let loose because even their maximum potential does not threaten to seriously damage the game balance (looking at you, monks and rogues), a few things became clear pretty quick in the 3.5 and derivative editions. I've then spent a fair bit of time reading on the subject, both on professional blogs and Paizo's forums to see if my thoughts mirrored others. In many cases they did, although not always.
There are a few things that make a character a fun one to play, to me anyway. But I think at least a few of these qualities can be extended to others fairly easily, and I think most people would agree a character that meets the qualities listed below will generally be more enjoyable than one that doesn't.
1. Isn't a one trick pony
This is the biggest issue with the "pure" classes, which primarily focus on a single aspect to the exclusion of other things - the biggest and best examples being the two staple classes of fighter and wizard/sorcerer (assume I mean both wizard and sorcerer if I say just wizard - the classes are interchangeable here). Both classes ultimately rely on a single thing in combat - the fighter relies on being able to hit stuff with a stick and make it hurt a lot; the wizard relies on being able to land spells reliably that will improve the odds of the fight in their favor - either by stacking on more damage with blasting, altering the battlefield in a way that hampers the enemy, or having a powerful "save-or-suck" spell at the ready.
The issue with these kinds of characters is that the wrong kind of fight can make them feel nearly or almost completely useless. A fighter running into a foe with significant DR that they cannot bypass easily will make him a glorified ablative shield for the party relatively easily; in the mid to high levels, this is realistic possibility at least once in a while. Likewise for the dedicated spellcaster, a foe with high saves or significant spell resistance can potentially render them completely moot, depending on their build. Now these kinds of things can be bypassed with things like spell selection and having many different weapon types and materials available to you, but there's no guarantee you'll have what you need in any given fight. In some ways, that's part of the challenge and fun, but if it happens too often, you might have an issue.
2. Is useful both in and out of combat
This is primarily done with skill points, and one of the biggest issues I have with 3.5 and PF's design concept is that the classes that would tend to need this the most tend to get the least skill points. Specifically, I am thinking about classes like the barbarian, fighter and paladin; these are classes which are quite good in combat, but have little to no inherent ability to affect the world around them outside of combat, and must rely entirely on skills.
When you consider classes that have ninth-level spellcasting - the cleric, druid, and wizard - we don't generally think about it in these ways, but these classes have built-in role-playing power baked into the class, no skills required. The power and strength of the spells they can bring to bear can not only affect the game world on a potentially massive scale, but also completely circumvent adventures in the right circumstances.
Imagine this scenario - Prince Leon of the Kingdom of Whatever has been kidnapped by the evil lich What's-His-Face. He's placed him deep in his dungeon and the heroes must rescue him before it's too late. Pretty common, right? The party travels to the dungeon, kicks in the door, kill the monsters, steal the treasure, and save the prince. Except if you're a powerful enough wizard, there's no need for all that. Because you can easily cast Scry to get eyes on the Prince (you only need any possession of his, which should be easy enough if someone is hiring you for this), then Teleport over, grab him, and Teleport back. Constance the party magician spends about a minute, disappears for 6 seconds, comes back with the prince, and says "GG, EZ game, EZ life". And this is done with a single second level spell and two castings of a single fifth level spell. That's before you get into world-altering effects like Anti-Magic field, Wish, Time Stop, or other non-sense along these lines. Druids and Clerics have similar powers that are only a bit less flashy, in the end.
But classes that lack spellcasting have no such abilities baked into their classes. Any potentially role-playing benefits they get from being members of their class must come through GM fiat, rather than being included as a core part of the rules.
3. The class has niche protection
This is a point that is arguably more important than even relatively power level. Niche protection is a thing that I think must be respected and is important to keep in mind when designing and playing characters. What I mean by niche protection is that your character has a thing they do, and they are "the guy" in the party that everyone turns to when it needs to be done. So, for instance, most parties have a "face" - someone who steps up and handles all the talking for the party because they have the skills for it. If the character has invested a significant portion of his potential into those abilities, any character coming along and being superior at it, especially if he can do so in a trivial way, is an issue.
So imagine you have a face, and when you guys come across a guard in a dungeon, rather than fight him, your face steps up and convinces him that he's better off laying down his weapon and walking away, or maybe even helping you guys before going for the door. Now the next time you come across a similar situation, the wizard might say "let me handle this", and cast Charm Person, a simple first-level spell. If the will save is failed, not only has the face's job been marginalized, but it's been done with a minimal of effort on the wizard's part - later on, he could even craft a wand with the spell so he doesn't even have to use a spell slot on it. Further, you can easily argue by RAW that Charm Person is far more useful than using social skills to improve someone's attitude - because with the spell they consider you their "best friend", whereas using a skill like Diplomacy can only take you so far.
With that in mind, I've since believed that a very well-balanced four person party in the Pathfinder game would include the following classes...
Bard
Paladin
Ranger
Inquisitor
...and that the above party would be extremely balanced against each other so that they generally meet all the criteria above. Let's go into a bit of detail with the reasons I like these classes in particular.
1. One-trick pony test
One thing you may notice about all of these classes is that they are all partial casters in one form or another, and none of them have poor base attack bonus. The paladin and ranger, being primarily considered combat classes, have good BAB and up to fourth-level spells available to them. While that is not particularly powerful, they have backups available if pure sword/bow approaches aren't cutting it. Likewise, the inquisitor and bard are generally considered supportive/caster first and combat secondary - they get up to sixth-level spells, but have a medium BAB. Properly built, and particularly with the inquisitor's Judgement ability, they can definitely be strong combatants without sacrificing their ability to use spells to great effect.
2. Useful outside of combat test
This one is slightly trickier, as none of these classes have the awesome power of wizards, clerics, or druids, but they all have solid potential to affect things outside combat. First, all except the Paladin have at least 6 skill points, with the bard sporting the maximum of 8, with likely a decent intelligence to boot. Furthermore, some of these classes spells have utility outside of combat, such as the bard's Legend Lore or Sepia Snake Sigil, or even Invisibility in the right circumstances. Bard and inquisitors also have relevant class abilities that can be used out of combat to great effect. Paladin and Rangers are a bit weaker in this regard, but the ranger has skills to make up for this a decent bit, as well as the favored terrain ability; paladins are the only ones truly lacking, with only a pitiful 2 skill points to their name, and not many useful class abilities outside of combat.
3. Niche protection test
This is where the composition I like really shines, I feel. While none of these classes are so focused to the point where they can be rendered useless (note they have many varied and useful class abilities), each of them have that little extra oomph in their area of expertise that pushes them just a little bit ahead of the rest of the group in the right circumstance; the best part is, arranging for these circumstances is almost trivial for a decent GM!
The ranger, of course, is your natural world expert. With skills like survival, knowledge (nature), and knowledge (geography) being right in his wheelhouse along with nature-themed spells and class abilities, he can naturally and quickly take the lead as the party treks through the wilderness, prepares to camp for the night, or are tracking foes overland, he can easily shine. The inquisitor can help with some of these tasks through a little cross-over with similar skill sets, while also having his own focus with his judgment combat ability and focuses on intimidation and sense motive when being nice isn't working anymore. His own spell selection and choice of teamwork feats can also amplify the party on the fly.
When the party treks back to town and into urban environments, the bard can take the front again, his massive skill selection, extensive knowledge, bardic music abilities, utility spells, and natural ability to serve as an effective face leading the way for social encounters of all kinds; in a pinch, he can serve as an effective rogue, with spells and skills to get him past even the toughest defenses without a fight. But when the showdown with evil comes, as it always does, everyone can look to the inspiring paladin, granting party-wide auras, effective healing, personal immunity to all fear and disease, and, of course, their signature smite evil ability, allowing them to smash their hated foes into dust.
There's no doubt that, objectively speaking, this party is not the end-all, be-all. Besides missing high-level arcane and divine spells, certain foes can certainly give this lineup fits, particularly if caught unprepared. Besides that, the paladin may need a slight propping up by the GM outside of combat to bring them more in-line with the rest of the group. However, if you are looking for a set of classes that are well-balanced against each other, ensuring that no character is overshadowed and everyone has their time in the limelight, while also being able to contribute in almost any circumstance, I do not believe you will find a better set of four classes within the Pathfinder game.
I’m more familiar with D&D 3.5, for which the CO crowd devised the Tier System of class balance. There are also Tier lists for PF, but as PF is still an evolving system that gains new moving parts with each books this can only be a momentary snapshot.
I’ve made good experiences with the Partial Gestalt solution to the imbalance of 3.5 classes:
The layering I have used is Tier 1//-, Tier 2//6, Tier 3//5 and Tier 4//4.
It keeps the GM from needing to babysit and carefully allow/disallow certain crunchy bits, is popular with the players as it is a general power-up and patches up weak-spots in a lot of 3.5 class designs.