My old friend Steven Den Beste wrote this awhile back:
Let's talk about the Third Amendment for a moment. Remember that one? Probably not; in this day and age it's something of a Constitutional joke. "No Soldier shall, in time of peace be quartered in any house, without the consent of the Owner, nor in time of war, but in a manner to be prescribed by law."
Remember now? The Bill of Rights which passed Congress had twelve clauses, and ten of them were almost immediately ratified by the states. Amendment Three was one of those. Why did they bother?
It's because memory of the Revolution was still current. It was only a few years after the Revolution succeeded, remember, and memory of British tyranny was still fresh. The British had done this, and the citizens of the nascent United States wanted to make sure their new government didn't.
The reason the colonies revolted was because the King of England was viewed as having become a tyrant. Having fought a bloody war to become free of his tyranny, the founders wanted to make sure the new government they created did not in turn become tyranny. Trading one tyrant for another wasn't what they had in mind. So the Constitution contains layers of mechanisms to try to prevent tyranny. And the last and best of these is the Second Amendment.
Remember how the shooting revolution began? The Battles of Lexington and Concord. Rebels in the Boston area had been stockpiling weapons, powder, and ammunition near Concord MA, and the British got wind of it and sent an armed column out from Boston to seize the stockpile. Superb espionage by rebel forces detected this, and word spread through the countryside for the militia (remember that word; it's important) which formed up and fought against the British force. The main battle was fought at Lexington MA, which repelled the British and caused them to retreat again back to Boston.
The "militia" was all able bodied men in the area, who were to show up with their own rifles (or muskets). Weapons of that era varied quite a lot, and of course they were muzzle-loaded using black powder. It took a lot of training to use such a weapon effectively (especially rifles, which were much more difficult to load than muskets) and that's why it was desireable that the men have their own weapons. It was assumed they already knew how to use them.
The earliest battles of the revolution were fought by such militia formations. Another was the Battle of Bunker Hill. It was only later that the Revolutionary Army was formed, and began training at Valley Forge.
Having just won their revolution, in which privately owned firearms played such a critical role, and mindful of the potential for their new government to potentially become tyrannical, the purpose of the Second Amendment was to make sure that the people of the United States would have the means to rise in revolt once again, should it become necessary.
That's what it's really about. It's not about hunting weapons; it's not about the "National Guard" (which isn't a militia). It's about everyday law-abiding citizens having the ability to resist a tyrannical government. And with that deterrent in place, we've managed 230 years without our government descending into tyranny (though it's come close).
One of the most common problems when discussing the US constitution is that people will apply modern definitions to 18th century words. For example, the word "regulated" today implies government run. Such a concept would have been absurd in the 18th century. Well regulated meant effective. Similarly, the word "welfare", as in, "promote the general welfare", was not about giving money to the impoverished but supporting the general stability of the states (not to mention it's in the preamble and has no legal meaning anyway). And of course, Militia today is often considered thought of as being government related whereas it traditionally meant "a group of armed men".
update: snipped out the overtly political paragraphs.