Here's another way of looking at the question. In the scatterplot below, I have plotted out the percent of Americans who claim to attend a church, mosque, or synagogue at least weekly with the rates of firearms deaths per 100,000 residents in each U.S. state. What do we find?
The relationship between religiosity and gun deaths is positive. Now, this doesn't mean that religiosity causes violence, and there are a lot of other factors out there that predict gun violence, including poverty, local gun laws, and culture (notice how the upper right quadrant is almost entirely southern states?). But it seems reasonable to conclude that our society's "turning away from God" is not a primary reason for gun deaths.