The SCOTUS ruling today that the 2nd Amendment trumps the prerogatives of state and local governments answers a constitutional question, but the debate over guns in the court of public opinion will surely rage on. That debate can be boiled down to whether guns encourage or prevent crime.
The folks at FortiusOne crunched the data on this debate in 2008 and measured restrictions on gun ownership (whether states deny juveniles, felons, etc. ... or regulate certain types of guns) against crime levels, and specifically murder and burglary rates. They found little to no correlation.
On the maps below, the larger circles denote more restrictions and the darker shade means higher murder and burglary rates. States with heavy restrictions varied from peaceful Iowa to violent California. Similarly, lenient states such as Nebraska and Louisiana ranged widely in murders and burglaries (Nebraska has few of either; Louisiana has many).
Wyoming had by far the fewest restrictions, followed by Vermont, New Mexico, New Hampshire, and Montana. The states with the most restrictions were Hawaii and Massachusetts, followed by Illinois and California. Ultimately, gun laws are often reactions to already existing crime, but the philosophy of how to deter those crimes varies widely geographically.
[Full data set available here]