Average NPCs generally used 3d6, though it varies
The exact rules for generating ability scores for average NPCs such as commoners varied by game edition.
Original D&D
Men & Magic (1974) notes that 9-12 is average for player characters (as per 3d6), but doesn't specify whether this applies to NPCs or peasants. 3d6 is the only attribute generation method in the original rules, and I don't believe there are even attributes defined for common people.
AD&D 1st edition
The AD&D 1st edition Dungeon Masters Guide (1979) went into detail about the distribution of dice odds, and detailed as follows on page 11:
General Characters: Roll 3d6 for each ability as usual, but use average scoring by considering any 1 as a 3 and any 6 as a 4.
Special Characters, Including Henchmen: Roll 3d6 as for general characters, but allow the full range (3-18) except in the ability of abilities which are germade to his or her profession, i.e. strength for fighters, etc. For all such abilities either use one of the determination methods used for player characters or add +1 to each die of the 3 rolled which scores under 6.
In other words, generic non-player characters like peasants rolled a range which tended to make them extra average, with a minimum of 6 and maximum of 15.
Player characters could naturally use various methods of generating ability scores that gave a 3-18 range and a higher likelihood of high ability scores.
AD&D 2nd edition
The AD&D 2e Dungeon Master Guide, Revised, p. 27, simply describes the ability scores of 0th-level commoner-type NPCs as follows:
These range from 3-18.
The Player's Handbook Revised notes that optional methods of rolling dice other than 3d6 produces "above-average" characters, implying that characters generated with 3d6 are typical. This isn't specific as to whether this refers to NPCs or just PCs, but we know at least that NPCs in 2e have the full range of 3-18, so it's plausible, if not explicit, that the average person is rolled with 3d6.
D&D 3rd edition
D&D 3.5 Dungeon Master's Guide p.110:
Average characters, on the other hand, have average abilities (rolled on 3d6) and don't get maximum hit points from their first Hit die.
Adventurers and other elite characters tend to have above-average stats, which may include using 4d6 drop lowest or the elite array, but it is noted that some NPCs with class levels may in fact be average people, and use only 3d6.
D&D 4th edition
In its DMG p.187, it gives NPCs an elite array of stats between 10-16 which is considerably above 3d6. However, this is only for NPCs with a character class who are expected to act as allies or enemies. There are no specific rules for generating average peasants, except perhaps monsters like the human rabble, whose ability scores are mostly in the 9-11 range.
D&D 5th edition
This edition glosses over NPC statistics, saying in Dungeon Master's Guide p.89:
You don't need to roll ability scores for the NPC ...
However, Player's Handbook p.13 does describe ability scores of 12 and 13 as "above-average", which suggests that something equivalent to the 10-11 average of 3d6 is still average. Page 173 concurs, and explains that adventurers are above this level:
A score of 10 or 11 is the normal human average, but adventurers and many monsters are a cut above average.