Religion, Communism, Capitalism... as long as people have something to live, kill and die for, bad things will happen. How many people have been killed in the name of "keeping Communism at bay"? How many are still in Guantanamo in the name of the "war against terror"? How many atrocities have been committed in the name of peace, freedom and "our way of life"?
Religion is a tool. Not more, not less. First, to convince yourself that something "has to be done", and then of course to justify it towards others that we do something that is morally wrong. And I am talking about a very secular kind of moral, not the religious kind. The kind that has the ultimate dictum that whatever I do not want others to do onto me is most likely also what they do not want me to do onto them.
Killing people is wrong, but if they don't want to join our cult, we have to slay the heathens. Stealing is wrong, but we cannot let those barbarians keep that gold. And so on, and so forth. Religion has been a pretty tempting reason to kill, steal and be a really nasty asshole otherwise.
Of course, some individuals have been very generous and selfless due to their religious conviction. I'm thinking of people like Mother Theresa and others who took the example of Jesus (who I still think was a pretty awesome guy if only half the crap in the bible is accurate) and tried to live up to it. If more did instead of abusing his message of peace, cooperation and understanding to cause grief, dissent, war and pain, there was no need for heaven for we would have a paradise on earth.
Problem is, people are assholes and they will use whatever justification. Religion just tends to be one of the simplest ones.