Defending against the government in the US
Guns are seen by many as a way of insuring that if revolution was required, it would be possible. Yeah, the military has tanks, jet fighters and nukes, but the idea is that if there's a truly popular uprising against the government (i.e. not some wacko nutjob militia outfit in Nevada or something, I mean tens of millions of Americans) that it would be impossible for the government to get its military to use force against the populace.
You can drum soldiers up into an "us against them" fervor where maybe they don't think too hard about knocking heads and taking prisoners against unarmed masses. It is another thing entirely to be asked to shoot and kill your fellow countrymen who won't easily be taken prisoner and will be willing to shoot at you to prevent it. (Hopefully) enough soldiers would refuse such orders that the government would be unable to wage an effective campaign against a large popular uprising.
That's why the US population should be armed. They can't take on the best the US military can dish out, but they won't have to. They just need to be armed and ready to fight, and the generals won't have very many infantry willing to take them on because they know they'd be asked to kill those who resist.