This post was originally intended to be my personal take on every core D&D/Pathfinder class. About a quarter of the way into that ambitious (at least considering the amount of free time I have) undertaking, I realized it was a lot of effort to make more smoke than fire. Some classes, like barbarian, need little explanation. Half the joy of RPGs is making your own character anyway, so what does my input matter to someone else? That said, one point in that longer post can be salvaged into a meaningful article: Some classes are quite misunderstood and thus, I dare to say, underrated. So, this article will be about them -- or rather, how and when to use them.
This should come as no surprise to someone who's worked for both large and small organizations, but individual roles are strongly influenced by group size. Smaller groups benefit from generalization; large groups from specialization. With that in mind, I find it somewhat remarkable that almost all players generate characters as if the group was large (6+ PCs). Large groups can diversify their talents enough to cover each others' weaknesses (the barbarian protects the wizard from physical harm while the wizard protects the barbarian from spells, etc.), but small groups -- which are more common, in my experience -- don't have that luxury. There aren't enough skill sets to go around, and formations are usually too porous to be effective. When the party numbers only 2-4 characters, all members must hold their own in combat. Similarly, every character needs something to do other than just combat. This is when character classes you might not have considered before start to shine.
A small party's overall capabilities are overwhelmingly determined by what the characters do. For example, if the party consists of a barbarian, a fighter and a paladin, the DM had better prepare a conveyor belt of critters because fighting is about all they'll do. This is somewhat intuitively obvious, but the campaign implications often aren't considered. In my experience, specialized groups aren't fun for more than just a few sessions. For what it's worth, I like RPG combat as much as the next gamer. However, all combat, all the time gets boring for the players and exhausting for the DM. What else would such a group do, though? The same goes for a party of magic-users; melee is almost never an option so there is a built-in constraint on the party's tactics and, by extension, the DM's ideas. With that in mind, I argue that small parties are better suited for more intruiguing, story-based adventures where combat and tactics are just means to an end. This requires generalists. As a rough example, consider a case where the party is tasked with destroying a large and established bandit camp. With a variety of approaches at their disposal, a large party might take on the camp by themselves. A small party of warriors could do it, as well, but slaying the 30th bandit won't be as sweet as the first. In contrast, a party of generalists might solve the same problem by interacting with the bandits' victims and thus forming a regional coalition. It may turn out that the bandits have the blessing of one of the local lords, triggering a game of cloaks and daggers within a maze of conspiracy -- a level of intrigue the other parties would not uncover until the last bandit had already been killed. Trying to sift the allies from the enemies will draw the attention of all sort of spies, bounty hunters and assassins, so there will be no shortage of combat and no individual will be safe from melee. However, while the scope of the story would be as large as the bandit camp itself (and arguably larger), the small party would only take on threats it could handle.
There are gamers that prefer these kinds of adventures anyway and I am one of them, but this level of complexity really works better with smaller groups of generalists. First, smaller groups are more socially flexible. It's hard to hide a motley group of heavily armed adventurers even within a crowd, let alone infiltrate a society with one. ("What, you ALL want to sign up for our guild at the same time?") The group can split up, but that disrupts the adventure's overall flow. NPCs that join the party are more readily accepted as meaningful characters whereas larger groups might see them as just more warm bodies, if not ignore them entirely. Also, in-depth conversation and complex storylines are more manageable with fewer players; even among well-behaved gamers, without something simple -- like combat -- for a large group to focus on, involved plots can get bogged down with chatter.
Considering all of the above, what classes work best in small groups? Without further ado:
In large groups, bards are considered dedicated support & emergency backup at best, useless comic relief at worst. In smaller groups, however, the bard is severely underrated. Small groups mean each character has to "wear a lot of hats", and no single class does that like the bard. In addition to blending physical combat and magic, they have Knowledge skills that are much more fun to use in adventures suited for smaller groups. They are often portrayed as wandering minstrels; their capacity as investigators of ancient mysteries is understated.
Then again, the fact remains there is nothing the bard can do in combat that can't be done better by another class. Even in the most cerebral campaigns, a bard needs a combat role outside pure support. The conventional approach is to shore up the combat stats across the board, then give up and make a barbarian. It's often the case that the stat-ignoring "real role-players" pick the bard to woo the ladies with that high Charisma while the "real man" players avoid the class like it's diseased, but this is where some of the latter's knack for optimizing stats can go a long way. In AD&D2, for example, a fellow player once noticed bards did not have the weapon restrictions rogues did, so he picked up a two-handed sword. ("I didn't hit often," he said, "but when I did, they felt it.") A combination of ranged weapons and Dexterity seems like the obvious choice, but be careful. Like I said, in small groups, everyone must be capable of holding their own in melee. In large groups, bards are more likely to rely on their support abilities behind a wall of armored meat. A ranged attack is likely to gather dust either way. In any case, whatever you decide to do in combat, stick to one thing and make sure the bard can do it well. It's ironic, but bear in mind the bard is a pre-generalized class; its versatility doesn't need any work.
Druids get special mention here because their summoning powers give them a reputation of self-sufficiency, and self-sufficient classes are considered ideal for small groups. I actually recommend NOT using a druid in small parties because of their inflexibility. They don't do much outside natural terrain beyond attract attention and cause havoc. Small groups more fluidly interact with society, where druids are often a liability. There may be ways around it, but the company of a tree-hugger and a giant animal will make infiltrating a guild much harder than it needs to be. They have the same restriction in large parties, but as mentioned above, large groups aren't as likely to get neck-deep in spy games.
There isn't much freedom to customize a fighter in versions prior to D&D3, so I'll stick to the post-AD&D2 fighter. With a fighter, the tendency in large groups (by necessity, unfortunately) is to specialize as much as possible to keep up with other mashers like the barbarian. Freed from that obligation in smaller groups, the fighter is a nice class with which to embrace a more versatile, "combat technician"-type role. Instead of piling on feats toward a single style to dish out maximum damage, a fighter can diversify with feats like Blind-fight, Iron Will and Quick Draw yet still provide the melee punch every group needs. The result will be less physically intimidating, but more flexible and self-sufficient in the sort of anything-goes world of "small group" adventuring. To stay relevant outside combat, pick 1-2 useful skills -- not necessarily class skills -- and throw all your meager skill points into them. For example, if the group is lacking someone with Appraise, you could be "that guy".
Monks are wonderfully suited for small groups because of their versatility and self-reliance. They are like the generalized fighter above, except they are far better at it. I rarely play monks in large groups because they wind up rather invisible and disappointing. They can't keep up with the brawlers despite the impressive unarmed attack damage, and they lack the toughness to take front-line hits. At best they are mage-killers for their ability to resist spells and close quickly, but this "rush the mage" tactic is easily neutralized by effective use of minions. In small groups, however, monks are walking joy. Most of their powers don't make them juggernauts in combat; however, they are very well-suited to handle a wide variety of hazards. Unlike hyper-specialized brawlers, they are more likely to survive the 168,391 ways to die in a dungeon that aren't a mean-looking monster with sharp teeth. If you're in a group of 2-4 players and insist on conventional dungeon-crawling, you can't go wrong with a monk.
This class gets brief mention for its ability to heal others and resist non-physical attacks (disease, etc.). Overall, though, the non-combat utility of the paladin is rather overrated. Despite their reputation for being leaders, about all they have going for them in that regard is a high Charisma requirement. Furthermore, the paladin has unforgiving restrictions on whom they can work with and what they can do. Everything the paladin is known for outside combat -- charisma, leadership, etc. -- can be done better by any other class by simply not using Charisma as a dump stat. It's certainly not a bad class by any measure, but the paladin is more represented by the merits of honor and Charisma than the other way around.
In my opinion, the rogue is a much more advanced class than most gamers believe. It's given a few abilities (namely backstab/sneak attack) to keep busy during combat, but those abilities are difficult to use effectively without taking some gutsy risks. D&D compensates by also giving the rogue a fine array of skills, but this results in the rogue often getting reduced to a mere extension of the tools. The party has a rogue, so the DM adds traps & locked doors for the rogue, etc. This really doesn't add to the fun; it just slows down gameplay to keep the rogue relevant.
Big groups or small, when I play rogues I am more likely to multi-class than with any other class. Adding a couple levels of barbarian or fighter downplays the rogue's role as a glorified toolkit and greatly improves their usefulness in combat. It's certainly nice to have someone who can pick locks or disable traps, but the rogue's access to investigative/social skills are often overlooked. For example, why not set off traps deliberately and break down doors? (If a door must be dealt with silently, the wizard had better have a knock spell -- tools aren't necessarily quiet either!) On the other hand, a rogue with a high Intelligence and/or Charisma and an arsenal of social skills is a bottomless well of adventure hooks, and these skills can be used in armor without penalty.
Multi-classing has often been described as, "The disadvantages of both with the benefits of neither." That's certainly true in large groups, because you're diversifying when you should be specializing. The time to multi-class is when the group is so small that there are more roles than characters.
Multi-classing in pre-D&D3 games was straightforward and often even advantageous. A fighter/mage didn't need to ask the wizard to memorize spells that enhanced combat abilities; why bother when you can cast them yourself? A mage/thief could rely on spells to do the job of some skills in order to specialize in others, or use the spells in "I can't afford to fail my check" situations. Averaging out the hit points was often rightly noticed as a downside, but the way they took the "best" saving throws of each class was frequently taken for granted.
In D&D3, multi-classing is considered a gateway to prestige classes that make the investment worthwhile. That's certainly a valid (if uninspired) use, but the benefits of multi-classing itself are often overlooked as a result. Basically, multi-classing is best done by picking up 1-2 levels of one class to address weaknesses in another. It generally works better by favoring the non-physical class; after all, what would a paladin do with a couple levels of sorcerer? In contrast, as mentioned above, a rogue with a couple levels of barbarian or fighter is much more capable in combat than relying on rogue abilities alone. In small groups, the physically weak sorcerer and wizard meet that "must hold their own" requirement with just a couple levels in a similarly "tough" class. Sure, you fall behind on spells, but that's the price for not having a small army of thugs to protect you -- you gotta be your own thug. The fighter is accurately considered an underpowered class in D&D3, but it has some usefulness as a multi-class option. Consider the fighter from the perspective of a physically weak class, such as bard or wizard. Just one level in fighter provides extra hit points, a Fortitude save bonus, an attack bonus, a bonus feat and access to all weapons & armor. You can't use the armor without some trade-offs, but you might as well dissuade anyone from getting near you by swinging decent weapon.