The cause and effect can be reversed. People having extreme problems like with mental illness often search for the support in the religion. When they are helped we do not hear about it, when they are harmed or if a religion is involved in a neutral way we are more likely to hear about. It is like blaming the physicians for being involved in most of deaths and serious diseases (not that sometimes they might be the cause of a damage).
And why not? These days, the perpetrator is never guilty of his or her acts. It's always something or someone else.
Ever read "people of the lie"? Some folks are just plain evil. Some are just crazed because they want to be that way, or don't care to stand up for their sanity.
Classic nature vs. nurture discussion could be inserted here... but the fact is, hitler was evil because of the simple fact, that HE WAS EVIL.
Same with our al queda problem.