I figure they would be weak (maybe 5 or 6 HD max), have no attacks, and give no xp (as good guys aren't supposed to kill civilians). The reason I ask is for things like the PCs and bad guys having a fight in a crowded town square or the like. This adds an extra challenge as the PCs can't use stuff like fireball as they (if they aren't evil) don't want to kill innocent people, whereas the bad guys have no qualms about this and will use AoE spells freely.
Probably just take an average citizen and apply the troop template with the rabble modification. Having them to do no damage I think would make their inclusion less interesting as they would just get ignored by both sides. If they aren't aligned with the heroes or villains then I would apply a permanent confusion effect on them. In this way it's random what they do. Now, the villains are more likely include civilians in AoE attacks as they are a nuisance, while the heroes will want to stay away to keep from getting attacked randomly. The damage being dealt is less the result of an intentional effort for the citizens to do harm. As it is the result from being pushed and/or trampled by a large group of panicked people.
The non-combatants would have to be trapped in some manner or oblivious to the combat for them to continue to pose as an obstacle for more than a round or two though. IRL if you were in a mall during holiday shopping and two customers suddenly broke out into a knife fight, an open area would form around said fight, with a densely packed crowd at its edge. As much as a shopper might want to get to a store on the other side of the ring they aren't going to risk getting stabbed to do it. Even if fights like this were common.
Depends entirely on the purpose of the crowd.
Are they meant to be collateral damage for the bad guys? As in, a crowd of people fleeing away from combat and getting caught in the blasts and explosions?
Are they just meant to block progress (I imagine not since you mentioned them dying to bad guys) and slow people down?
Are they supposed to actively put up a fight?
As a general rule I use:
Common person - Level 1 in an NPC non-combat class (commoner, expert), these are most numerous
Talented but untrained fighter - level 1 warrior, probably amateur brawlers and the kind
City guard - level 3 warriors
Professional soldiers - level 3 fighters
Smattering of low level arcane and divine NPC casters.
Anything above level 3 with a PC class would be a former or current NPC adventurer, able and willing to engage in a fight, the rest (with exception of city guard and soldiers) would be more inclined to run for safety than engage in combat.