I think Steven Weinberg summed it up most succinctly; "Religion is an insult to human dignity. With or without it you would have good people doing good things and evil people doing evil things. But for good people to do evil things, that takes religion."
I think he's mistaken.
I believe that for the most part, good people do good things. None of us are perfect; we've all done bad things.
I think that even people most of us would consider to be pretty bad don't only do bad things. And I think that sometimes, it doesn't take many bad things or anything that bad to be considered a bad person.
This is true within and outside of any and all religious belief systems.
Just looking at my own family: some are quite religious; some are not at all religious and never have been. Some were raised within a religious faith; some were not.
Even the best person among them is flawed and has done bad things. One of the worst people in my family also did some very kind and generous things--things that I witnessed.
The idea that people can be divided into 'good' or 'bad' is poor reasoning, and is one of the ideas that religion (particularly Abrahamic religion) is responsible for propagating and promoting.
Of course it is nonsense, as we all know from our own experience - but it's very beguiling nonsense; Who doesn't believe themselves to be virtuous (perhaps with one or two minor and certainly forgivable transgressions)?
There are no good people; There are no bad people. There are just people; and all of them do some good things, some bad things, and lots and lots of uninteresting things.
What matters is not getting caught doing things that others see as bad (or very bad); Even genocide is OK, as long as the people who judge you agree that it was (regrettable but) necessary.
The oft forgotten moral of the Nazi death camps (and the Cambodian killing fields, and the Stalinist gulags) is that evil is banal. Evil is mundane, and it is done by normal, unremarkable, ordinary people just like you and me. All that is needed for evil to triumph is for public opinion to be vaguely in favour of it.
There are no good people; Just people whose fame derives only from their good works, while their bad behaviour goes unnoticed, or is glossed over or excused.
There are no bad people; Just people whose bad behaviour is noticed and judged, while their good behaviour goes unremarked.
Religion provides a handy mechanism for excusing or glossing over bad behaviour. And regularly getting away with bad behaviour - or worse still, being lauded for it - inevitably leads to worse and worse behaviours. Which is, of course, the point that Weinberg was trying to make.