A good religious person will generally do good things.
He may do so because his religion actually dictates the right moral course r simply because the religion has no opinion about the specific moral choice.
In the same situations a bad person will tend to do the bad thing with or without religion.
In other situations the same good person can be compelled to do bad things because his religion commands it. The good person would do the good thing, but the religious authority is a higher one than his own moral compass.
We are not talking about an either/or situation. People will make many choices throughout their life.