Alratan said:
One of the ways of dealing with it i to raise the average level of "commoners". A 1st level commoner will be 14-16 years old, and by the time they are 30-35 they will be 5th level. In areas with wandering monsters, a couple of these levels are liable to be warrior as well - to account for the weekly/daily weapons practice hunting/ survival requires.
A bar full of 20 Warrior 2/commoner 3 s can seriously beat your average low-level party if they get upity - and the mere fact that your average peasant could beat you at 1st level breeds long term respect.
I do something like this too. My "average joe" is typically around 3rd level in an NPC class. Tougher "normals" are around 5th level. First level NPC class characters are youths and the meek or incompetant. Most NPCs only have levels in NPC classes (Adept, Aristocrat, Commoner, Expert, Warrior and Thug (from Traps and Treachery - an criminal NPC class). Elite or exceptional NPCs will be above 5th level and/or have levels in PC base classes like fighter (instead of warrior or aristocrat), rogue (instead of expert or thug).
Peasant militias typically either have the Militia feat (from Player's Guide to Faerun - grants proficiency in all martial weapons) or a single level of warrior (sometimes more) replacing one of their commoner/expert levels. Peasant militiamen aren't all that tough individually, but as a massed group, they can give low levelled PCs a bit of a rough time. In particularly dangerous regions, I've had the average peasant militiaman be a 5th level commoner/warrior but that's a fairly extreme case.
Peasant militias should be strong enough to repulse some low-level raiders or a single larger foe (like an ogre or maybe an owlbear or troll, although those latter two should definitely inflict major casualties). In other words, they should be strong enough to provide a credible defence against most of the typical critters in the area (otherwise, the village either has a protector or it shouldn't exist).
Unlike the peasant levies, dedicated combatants (like town guards or men-at-arms) are pure warriors, warriors who eventually take a PC base class (e.g. war2/fgt2 - a common soldier who proved himself and was given superior training afterwards) or PC base class only (i.e. they got superior training at a young age). For scout/forester types, I'll use the expert class instead of the warrior. 3rd level experts with the Militia and Track feats make very credible woodsmen.
Of course, I use the same logic for hostile humanoid and giant communities too, and I consider their way of life to be harsher so they have proportionally more (and often higher level) warriors than the good races. An orc raiding party might be a bunch of low level youths seeking to prove themselves by attacking a human village but an orc tribe on the warpath will bring out its battlescarred veterans (high level warriors, warrior/fighters or fighters) and its bloodthirsty berserkers (warrior/barbarians or barbarians).
I should add that I do NOT give these higher level NPC class types the thousands of gp of gear suggested for such levels in the DMG. I only do that for noteworthy NPCs such as NPC adventurers or villains. Other NPCs have wealth appropriate to their social class and standing and nothing more.