This problem is easily resolved if we take a look at what it would mean if morality did depend on religion.

The Divine Command Theory states that what is morally acceptable is so because God has commanded it. But what, exactly, does this imply? It would help us to look at Plato's Euthyphro dialogue, in which Socrates asks Euthyphro, "Is conduct right because the gods command it, or do the gods command it because it is right?"

Let us look at the first proposition. If conduct is right only because the gods command it, then the gods just as easily could have made lying, cheating, and murdering right. This implies that the gods' will is arbitrary, and to say that "God is good" would be meaningless. If "Z is good" means "Z is commanded by God," then "God's commands are good" means "God's commands are commanded by God." This is clearly ridiculous.

What about the second option? If the gods can somehow see what is right and then tell us, it holds that there is a standard of right and wrong independent of the gods' will. We would then have to ask, "Why does God command it?" To accept this option, we must abandon the theological conception of right and wrong.

The point is, morality does not depend on religion. Anyone who claims that it does, as noted above, has only a tenuous understanding of logic and religion.

Source: Rachels, James. The Elements of Moral Philosophy. New York. Mcgraw-Hill. 2003.