This past Shabbat I gave a 20 minute presentation on arms sales and gun control in halakha. Here's the source sheet. Admittedly, I must stress that the 20 minute class was only scratching the surface of a very long discussion and I look forward to teaching about this topic in a lot more detail in the future. But in summary, I came to the following conclusions.
The seller of weapons has a moral responsibility to ensure that the buyer is not likely to commit a crime. In fact the crime would be on them more than the person committing the crime. This fits into the rubric of the Torah law "Do not put a stumbling block before the blind". Rabbinic tradition maintains not just someone physically blind but anyone who would be morally blind to a particular issue it is an obligation to prevent them from from stumbling by providing them with weapons that they could cause harm to themselves or others. (Similarly a bartender has a responsibility not to serve drinks to someone who has had too much to drink.)
Secondly, there is a responsibility to make sure that one's gun is safe and looked after. This is learned from the Torah law to have a fence around a flat roof. Even if someone climbed on your roof without permission and fell, you would be liable for not having the fence. So too here, the owner of a gun would be liable if his/her weapon fell into the wrong hands. Similarly, having a fence around a pool.
We then moved on to the subject of selling weapons to non-Jews and general arm sales. In the times of the Talmud, during much persecution, the assumption was that a non-Jew with a weapon would/could kill a Jew. Therefore it was forbidden to sell to non-Jews any type of weapons. However, shields which are primarily used for defense would be permitted to sell to them. Obviously, Captain America is not your regular shield user! The Talmud continues that it is forbidden to sell to a Jewish robber since they too will be involved in murder. We can learn from the Talmud that one should avoid any arm sales to anyone who is likely to be involved in crime. The gemara concludes that if the non-Jews are protecting Jews then it is permissible to sell them weapons for example the king's army protecting the Jewish subjects in the town.
Today, Israel sells weapons to other countries and in the past has even sold weapons which have been used against us. E.g. the Palestinian police using weapons given over after the Oslo Accords. Clearly all countries need to be careful with what will happen in the future. As it says in Pirkei Avot, who is wise? He who can see the outcome of his actions.
In discussions after the class some people suggested that Jews should be allowed to have guns in order to prevent what happened to the Jews in the Holocaust and in Communist Russia. I don't believe that a few guns in the hands of civilian Jews would have made a major impact on the result of those terrible atrocities committed against our people.
In conclusion, it is permitted to own a gun in Jewish law but one must make sure that it is properly secured maybe even with fingerprint identification and that one is in the right state of mind at all times. May we never need to use them and may all weapons be turned into plowshares.