Religion: If it is right it is good. God defines right.As a matter of course, most people don't live in these extremes. Religion, or lack thereof, are much more fluid concepts than either side wants to credit.
Atheism: If it is good it is right. I define good.
I am reminded of the more recent work by the author of "Why People Believe Things" (or some such title). It was his conclusion that smart people don't necessarily believe things because they are rational, but rather they are better at rationalizing their beliefs once chosen.