I remember hearing about that study in a sociology class in high school. Also said that people who followed some type of religion were generally happier people.
I know the studies you refer to, and it is true. My undergrad was in social and cognitive psychology and I read a lot and did some research on the social psychology of religion. There is some truth to the phrase "religion is the opiate of the masses". Especially interesting is that this effect only seems to have any effect within poorer communities and amongst the less educated. Recent research published in the journal of personality and social psychology found that there was a strong effect in subjects who did not have steady and reliable access to all of the necessities of life (the religious worrying about if they'd get a next meal were happier than the non-religious worrying about if they'd get their next meal) but in subjects who did have steady and reliable access to all of the necessities of life there was a weak reverse effect (the non-religious who felt safe and secure and had food were somewhat happier than the religious who felt safe and secure and had food).
I think the same phenomenon lays behind the famous phrase "There are no atheists in foxholes". Of course the phrase isn't actually true as stated, atheist soldiers do exist and they have been in foxholes and stayed atheists, but I don't think there is any doubt that desperate times will drive some atheists to theism. But all that really demonstrates is that desperate people will turn to the irrational. They also turn to psychics, superstiscion, and all sorts of other irrational things.
I've also read studies about theists and atheists in their charitable giving. It is true that theists "give more to charity". But when you look deeper, you'll find that "charity" includes things like building churches, missionary work, etc. "Religion" is still an official head of charity in Canada (to my embarrasment). There also still exist a large number of charities explicitly religiously motivated, driven, and named which are not pushing religion and actually are about doing real charity. The Salvation Army is a good example. But you may be surprised how many atheists give and work for these charities even though they don't agree with the religion named (usually Christianity).
In the particular case of muslims I would grant that it is explicitly part of your religion to give a percentage of your income to charity, which is something not explicit in other religions (they'll say something much more vague) and there is no universal code adhered to by atheists that would require such a thing either (though you may be surprised how many of us do give generously).
Given the cohesive nature of religion to its ingroup community (the outgroup is a whole other matter) I would actually expect religions to foster a lot of charity, aid, and good will towards its members. I'd expect it to foster a lot more than it actually has been shown to do in recent times. I think this may be because human populations have grown so fast and the group unit has grown so big and is no longer able to support an ingroup dynamic very well, hence all the splintering of religions into denominations and sects.
Tragic Typos said:
There was one study where people that believe in God are less likely to commit suicide, mainly due to the fear of hellfire. But I'm not sure if this study was accurate since it was quite old, but it does contain an element of truth.
The study related to this that I know of, because I was actually involved in it, showed that the moderately religious fear death the most, and the highly religious and not at all religious (atheists) fear it the least. This appears to be because there is uncertainty in the moderates, while the highly religious are all convinced they are bound for heaven and the atheists have literally nothing to fear (as they see death as literally nothing). There is a strong statistical trend that the more religious somebody is the more certain they are that they are going to heaven (or the GOOD side of the afterlife). Highly religious thinking they may be going to hell do exist but are far more rare according to the research, and strangely enough include a high percentage of children (still being indoctrinated I suppose) and women (no idea why) and almost never adult men.
For suicide, I think most religions have a "Suicide is a deadly sin" bit to them. Otherwise I'd have to wonder why these people don't hasten their journey to heaven. Some radical muslims seem to have found a way around this in wanting to be "martyrs" though.