In saying so, you must recognise that being nice, tolerant, accepting people goes entirely against their religion in most aspects, so they act that way because that is the kind of person they are, and that has shit all to do with the religion that they follow. They act that way because of an entirely secular ethical discourse and, furthermore, they must ignore their religion in order to do so.
Without religion you'd have good people doing good things, bad people doing bad things, but for good people to do bad things, that takes religion.
Firstly, describe these 'most aspects' that 'tell' people not to be 'nice, tolerant, accepting' people. And not from muslim. I can easily name aspects that tell people to play nice, we can start with the Ten Commandments and move all the way up to the Beatitudes if you wish.
Genetics and environment both contribute to the development of a human being. If they have all the genes to be a nice person but grow up around say paedos and murderers then they have little chance of being a nice person. By being educated in a religious setting (environment),
if done correctly, then there is a fairly good chance that they will turn out alright. Same for an atheistic environment - if the parents have their heads screwed on right then their children have a fairly good chance of turning out sensible.
However in saying that, 13 years of catholic education didn't succeed in crushing bullying, I've no idea what it would be like in the public system but I have a feeling it'd be similar. Assuming that bullying does generally exist in schools, then we can pin that more on human nature rather than a certain branch of beliefs.
You fail to understand the whole point of religion. In the olden days it was to provide moral guidance, give an explanation of the world and comfort the human fear of death. Nowadays the explanation of the world is more a metaphoric one (in the case of Catholicism one that I strongly disagree with because of 'original sin'), the other two hold. Religion provides an ethical code of conduct as a guideline, the general stuff is common across all religions and with most atheists (don't kill, don't steal etc etc). Religious people like the idea of a heaven or nirvana or something, depending on their adherence, and atheists are happy with having nothing after death. If someone doesn't like something they can easily opt out and follow something else; it's like the free market, people can shop around for a religion that suits them.
In fairness, all of humanity is learning as time passes. Looking at the stolen generations (fuck, more propaganda), religious institutions beleived they were doing the right thing
at the time by taking away kids from their parents. Now they've seen what damage has been caused and the majority of them to my knowledge have apologised. People commonly make the mistake of using modern ideas of ethics in historical situations. They did not have the advantage of hindsight back then and I'm sure if they were alive today they'd see their mistakes.
Plus religion cops a lot of flak for what a society has done as it's a pretty effective scapegoat, the crusades were seen as a opportunity by a few fellas as a way of advancing their political influence and ascertaining more territory and resources, burning muslims and heretics was an extra chore (yes there was a blessing from the Church and yes the Church was responsible for loss of life, I know all that).
I believe you are focusing waaaaay too much on extremists and not on the average religious person. I go to school with religious people, and they're some of the nicest people I know. They force none of their beliefs on others, they don't go round trying to say Darwin's an imbecile, they don't attack secularism or atheism or any other religion, and they most certainly don't go blowing people up. I look at their families and they're good religious people also, so there's a significant chance they have some good genes but I'd be willing to bet that religion in this case helped them along a bit. Sometimes when I bring up something to do with the crusades or arresting Galileo they do express regret for the past actions of the Church and wish it never happened. I haven't had time to talk about contemporary child abuse claims yet, that'll be next week
All people are generally the same... they're born, they live for a bit and they die. What they do in the middle, I believe, doesn't matter much as long as no one is hurt from it. The average adherent is not that bad yet still human, they're not higher or lower than anyone else. And who knows, by some fluke they could be right and they get to live forever more in paradise while apostates like myself will burn in hell for thinking Jesus looks like he's doing the YMCA dance while on the cross.
tl;dr when done correctly religion can help a person turn out alright, the average follower of religion overall isn't foaming at the mouth, and all people are equal.