I don't always make it clear why I like some classes and dislike others. I figured if I wrote my Optimization theory and the standards around it more posts will make more sense. Clarity is good.
When I say Optimization I don't mean flat out Min/maxing. Sure a wizard can pump his Intelligence to the point where everything pretty much auto fails saves vs his spells but he'll have no hit points, poor saves, and go last every round. In other words he'll be dead shortly and its hard to be effective when you are dead.
A well optimized character can do his or her job well and has few if any weaknesses. IMHO all characters should have at least a 12 Constitution because everyone from time to time is going to get hit and make fortitude saves.
Lets start with defenses. In general all characters should have save bonuses in all three categories equal or exceeding their character level. If one has to be sub-par Reflex is the least likely to end your characters life. Keeping this up to level 20 is very tough for many classes since often Wisdom or Dex are dump stats. I don't recommend every dumping Wisdom unless you have at least 2 levels of Paladin and a big Charisma score. Dumping Dex is still a bad idea in most situations but a 10-12 is usually ok as long as you have healing available and extra movement options (though I'm not sure how you'd avoid Dazing spells).
Armor Class is a bit odd. It works great for the first 5 levels or so and then begins to loose its effectiveness. The general rule with AC is for it to be your level +20. That will keep all but the bosses from hitting you 95% of the time. It is harder to boost Touch AC but it comes in very handy in those situations where you are fighting nasty things with touch attacks (like undead) or ranged touch attacks (like wizards). AC is really only useful for those classes that like to get up close and personal with the bad guys but all classes should have some sort of defense on standby.
For the melee types a miss chance is often better than high AC. Mirror Image or Displacement are great as is the Duelist's Parry or the pre-nerf Crane Wing deflection. Considering how difficult to get and pricey Damage Reduction is, I imagine that must work pretty well too but I'm never played a character that's put it to good use.
Offense is a tough one. If you are playing published adventures like an Adventure path, they tend to be based around non optimized characters and players that use team work and understand the game. Well optimized offensive characters tend to kill things pretty quickly and eventually the DM is going to start compensating by adjusting the monsters or at least boosting hp. In some ways its an arms race that really isn't worth taking part in. The party needs to be able to have high "To Hit" bonuses when required, have the ability to target Touch AC and some area effect damage for those god awful swarms. Really, damage dealing types should be able to kill any equal CR critter in about three rounds or less assuming full attacks. Of course extra fire power is always good if you can call on it when you need it.
Roles: There are several roles that characters can fill and any well optimized character should excel at his or her roll and be able to assist in other areas.
Meat Shield: Someone has to get between the squishies and the monsters. There are lots of ways to do this. Any character with good melee defenses as listed above or you can use disposable tanks like summoned monsters. The only real requirement is that it has to be threatening enough to keep your opponents attention. The tin can fighter that does 3 points of damage will be ignored but the gargantuan lake octopus that is grappling everything will not.
The Face: This one depends on how much roleplaying is actually being done. If you play with a group where entire sessions go by with no blood being spilt I have you have some ranks in one of the social skills or your GM gives good bonuses for good roleplaying. Otherwise, social skills can be very helpful but are usually not essential with the possible exception of Diplomacy. That skill is so versatile at least someone in the party should be at least reasonably good at it.
The Brain: While this often falls to the wizard, as long as all of the key Knowledge skills for identifying monsters are covered (Arcane, Planes, Religion) the rest are just a bonus. In a party without a high Intelligence class, each PC could take one skill and you'd have your bases covered. The other knowledge skills are useful and flavorful but really how often in a campaign is Engineering going to be useful?
The Buffer: All magic classes get buffs and these can act as a massive force multiplier. A party that is entering battle with Good Hope, Barkskin, Haste and Inspire Courage is going to be massively more effective than a party without.
The Debuffer: This role is not as effective as the buffer since here you often have to defeat saving throws for the debuffs to stick. The Witch class is probably the best debuffer and can set up any BBEG for what is almost an autofail saving throw with a round or two of prep. I would also put characters that specialise in Save or suck spells here as well since its all about taking opponents out of the battle.
Support: Problem solving. Having the right skills is a good help at low levels but quickly gets surpassed by magic. Flying, Stone Shape, Teleport, Gaseous Form, Disintegrate, Clairvoyance, Divination are all great ways to solve problems. Trap finding falls into this category as well but unlike earlier editions of the game its not as essential as it used to be. If you can be an effective trap finder while still able to focus on your primary role then go for it. Your party will thank you.
Healing: You don't need a good healer but life is much safer with one around. As long as you carry around crates of Cure Light Wounds wands and someone can use them to patch up injuries after combat you will probably be ok. Until Heal comes along healing during combat is not really your best move in most cases but its very helpful to have the standard Remove Poison, Disease, Curses, Restoration spells available, although potions and scrolls will again fill the gap. Heal is a big game changer in Pathfinder since its likely the first time you can heal damage faster than it is being delivered.
Damage dealer: almost everyone should be able to contribute here. Again its good to have a variety of damage dealing types. A few heavy hitter melee types, an archer, and a caster with a few blasty spells on standby.
Lastly don't spend all of your money on a handful of really nice items since you'll often do better but spreading the money around over a variety of magic item slots. One should have a Bag of Holding or even better - a Handy Haversack to store your collection of potions and scrolls within. After you've been hit with a blind effect its great to reach into your Handy Haversack and automatically get the right potion.
So that is my take on optimization in Pathfinder. It's more art than science. There isn't only one way to do it right but there are many ways to do it wrong since Pathfinder is full of terrible (or at least non optimized) options.