Inequality is the wrong diagnosis. As msandford pointed out, it's more likely to be a minimum standard of living issue and having enough to lose. If inequality was a main factor, you would expect Pakistan to have similar crime rates as Sweden, when in reality they're not even close. (PG has an essay on inequality being a boon to a nation's economy: http://www.paulgraham.com/inequality.html) You could also look at the religiosity of a country, but the trend there is that lower standards of living correlate with higher religiosity. (http://www.gallup.com/poll/142727/religiosity-highest-world-...) I'm more inclined to think the causation goes from low standard of living --> religiosity rather than the other way around, given the United States. However there could be other deeper factors that give rise to a low standard of living, such as a nation's average IQ -- you're not going to see a nation with average IQ of 70 outperform let alone match a nation with average IQ of 100 in terms of standard of living.
Good point regarding inequality vs absolute standard of living, but you're also talking about inequality within national boundaries. A good bit of the resentment of the Muslim world towards the West stems from perceived injustice and power imbalance on a regional or global scale.
There is also a big difference between inequality as a ratio of rich to poor, and actual conditions. The poor in Sweden are better off relative to the rich than the poor in Pakistan.