Due to my profession, I tend to focus on the right to keep and bear arms as guaranteed by the Second Amendment of the United States constitution. However it is important to note that the right to keep and bear arms for self defense was a preexisting right that is guaranteed by the Second Amendment. In other words, the Second Amendment is simply an acknowledgment of the right to own a gun, and a command that the Government not infringe that already existing right, rather than the source of the right:
A basic human right
As I have discussed before, self defense is perhaps the most basic human right, and a firearm is the most effective means of self defense for many people. For other people it may be the only effective means of self defense. With the existence of a right comes the ability to exercise that right, otherwise the right would be without meaning or effect. For example, the First Amendment right to a free press would be meaningless if the Government could order citizens not to possess writing implements, video cameras, websites, or other means of disseminating the news. Similarly, restricting gun ownership by law abiding citizens infringes this most basic human right (especially since criminals will still be armed).
A longstanding legal right, independent of the US constitution
Since time immemorial, private citizens have owned arms. These started out as crude rocks and sticks, then more advanced edged weapons, finally progressing to firearms. At English common law, hundreds of years ago, there existed and was recognized a right of the citizens to keep and bear arms. In the colonies that would later become the United States, a similar right existed. As colonies and territories became states, the overwhelming majority of these new states adopted a provision which guaranteed the right of the citizens to own firearms. Basically, this right has existed since long before our current system of government, and embodies the basic right to defend oneself from attack.