What is the purpose of the Second Amendment? It states:
“A well regulated militia being necessary to the security of a free State, the right of the People to keep and bear arms shall not be infringed.” 
If you look, you will find a massive body of literature attempting to slice and dice this simple statement in various ways.
This is my own personal analysis.
To me, the Second Amendment has these points:
1) It recognizes that a militia composed of the people of the state might be necessary to maintain the freedom of that state.
2) To that end, it is necessary for the people to retain the right to “keep and bear arms”.
3) “Keep and bear arms” means to own – and to carry. I can own a gun or guns, and I can take them with me wherever I go.
What does “shall not be infringed” mean?
I take it as there is no legal limit to what type of arms or how many arms I can carry around. The dictionary on my Mac says:
1 weapons and ammunition; armaments : they were subjugated by force of arms | [as adj. ] arms exports.
That seems pretty clear, to me. Arms includes guns, knives, basically any sort of weapon.
What can threaten the “security of a free State”?
1) Threats from without – we need to be able to defend against invasion from outside our borders. This seems clear enough.
2) Threats from within – individually, we need to be able to defend ourselves from criminals – i.e. self defense. We also, as a militia, need to be able to defend ourselves against our own government – if that government ever reaches a point where it is no longer free.
One possible interpretation of the point at which the State is no longer free might be the point at which that government attempts to take away our right to bear arms. There is a group which would love to do that very thing. If they succeed, we are in effect no longer a free people, since they will have removed our ability to defend ourselves. Anyone who requires me to give up my weapons is not my friend.
Vandercoy summarizes that last idea well :
“English history made two things clear to the American revolutionaries: force of arms was the only effective check on government, and standing armies threatened liberty. Recognition of these premises meant that the force of arms necessary to check government had to be placed in the hands of citizens. The English theorists Blackstone and Harrington advocated these tenants. Because the public purpose of the right to keep arms was to check government, the right necessarily belonged to the individual and, as a matter of theory, was thought to be absolute in that it could not be abrogated by the prevailing rulers.
These views were adopted by the framers, both Federalists and Antifederalists. Neither group trusted government. Both believed the greatest danger to the new republic was tyrannical government and that the ultimate check on tyranny was an armed population. It is beyond dispute that the second amendment right was to serve the same public purpose as advocated by the English theorists. The check on all government, not simply the federal government, was the armed population, the militia. Government would not be accorded the power to create a select militia since such a body would become the government’s instrument. The whole of the population would comprise the militia. As the constitutional debates prove, the framers recognized that the common public purpose of preserving freedom would be served by protecting each individual’s right to arms, thus empowering the people to resist tyranny and preserve the republic. The intent was not to create a right for other governments, the individual states; it was to preserve the people’s right to a free state, just as it says.”
So that is why the Second Amendment is so important. First, we have the inherent right to defend ourselves – and guns are clearly the most effective technology to that purpose. Second, we, as armed citizens, act as a check on the unlimited application of government. Granted, that is a last resort, but it is not beyond the realm of possibility that someday such a thing might be necessary. So we have the right to bear arms against that remote eventuality, as well as for self defense.
We need to take these responsibilities seriously. And we need to make certain that these rights are not taken away from us, nor are allowed to atrophy from lack of use. We have a responsibility to bear arms, in this regard, just to maintain that right in the event that we ever do need it.
I should like to add that the type of weapon is not limited by the Constitution. There is a concept advocated by anti-gun activists that guns should be limited to what is “reasonable” – and they get to decide what is reasonable. I believe this is a false, and dangerous, concept. Whether I am carrying a 9mm pistol, or a bazooka, it is illegal for me to misuse either one. The law already rightfully prohibits misuse of almost anything, but especially firearms; so why is there a limit on what you can own and use? So to my mind, “shall not be infringed” also eliminates the legality of laws prohibiting certain types or features of firearms, etc.. This also applies to laws that require particular features for “safety” or “tracking” that are designed to drive up the cost of the weapons rather than to add utility to the weapons.
God did it in one: “Thou shalt not commit murder”. All other laws chipping away at gun rights are superfluous, because first, they are unnecessary, and second, criminals will not observe them in any case. And don’t get me started on so-called “gun free zones”! Because criminals don’t choose to read the signs.