This is for 5e, mind you, and kind of house ruled.
Depends on what kind of commoner, and commoners do have hit dice. Usually some tool proficiency or two even if it is just being the village drunk. A farm hand may have 2 HD, but the overseer may have 4. How large depends on how you want to make the common folks vs full PCs/NPCs/BBGs. Low as 1d4, high as 1d8 like 5e does for it's NPC section in the back of the MM.
All scores are usually 10 with an 8 in one. However, certain fields would encourage higher scores but nothing above 16. For instance, a farmer would have STR 12 to 14 just because of the heavy nature of the work. A courtesan would have CHA 14 to 16.
They may have 1 or 2 background skills, but that is it.
Now, there IS a standing behind the scenes deal that if a commoner becomes pivotal in an encounter, I adjust the stats somewhat. Being around greatness does inspire the common man.
But, done this way, its easier to do in your head if your players want to mess with random farmer dude #7 and you need quick stats.
Code:
Random Farmer dude (2hd commoner -1d4, for tougher 1d8)
ST 14 (+2)
DX 10 (+0)
CN 12 (+1)
IQ 10 (+0)
WI 10 (+0)
CH 10 (+0)
Prof Bonus (+2)
skills: animal handling +2, nature +2
tool prof. (farm implements)
Prof. Simple Weapons
HP 7 ( max 1st HD; avg 2nd d4+ CN) or (d8 HD if you want tougher) 15.
AC 10
Attack: pitchfork +4 1d6+2
Attack : rock +2 1d2+2