Many people believe that religion is the foundation of morality. This is not true. What religion provides are a couple of false moral theories.
Religion is not the same as science because God is not good at being a theoretical entity. Appeals to God only seem like explanations. There is no significant difference between saying that God created morality, for instance, and saying that there is a being with the ability and desire to create morality and that the being created morality. And, saying that is like saying that a detective has solved a crime when all he has done is write in his notebook that the crime was committed by someone with the ability and desire to carry it out.
Furthermore, if God were the explanation for morality, we could not know what was right or what was wrong on the basis of revelation. Supposedly, God uses revelation to tell us things. Assume that God always tells the truth. Then a revelation from God would be entirely true. Unfortunately for the theist, it is impossible to know that something is a revelation. A revelation has to tell us something that we could not know in any other way. But we would have to show that something was completely true to prove that it was a revelation from a truth-telling God. Since a revelation must tell us something that we could not know in any other way, however, we cannot prove that any revelation is completely true. So, we cannot prove that any revelation really is a revelation. Thus, people who rely on “revelation” are always taking a leap in the dark. The philosophical term for what they are doing is petitio principia, or begging the question. It is a fallacy to beg the question.
As for so-called “natural law,” natural lawyers maintain that we ought to obey God’s will and that God’s will is discernible if we examine the natural world. Natural lawyers infer, for instance, that God intended that we engage in sex only for procreation. One problem here is that, according to biologists, human beings expend so much energy in connection with sex that procreation cannot be its only purpose. If it were just meant for procreation, we would have a mating season like other species. Thus, modern science is incompatible with the armchair observations of medieval philosophers who were unfamiliar with most of the world.
There is a worse problem with “natural law.” Natural lawyers say, for instance, that human beings are essentially procreative and infer that gay sex is wrong. In fact, if you define human beings as essentially procreative, what follows is that gay people are not human beings at all. Since gay people are obviously human beings, natural law must be false. It is impossible both to use essential properties to categorize individuals and to use a lack of the same characteristics as grounds to criticize them. You can categorize or you can criticize but you cannot do both with the same criterion. The same problem occurs with every norm proposed by natural lawyers: we cannot show that people who violate the norm are wrong-doing human beings rather than unobjectionable members of a different kind. Natural lawyers equivocate: they use one concept of humanity involving parentage or appearance to categorize individuals as human, and a different, essentialist concept to criticize them. Equivocation is another fallacy.
All that said, there is no reason why religion could not stop treating God as a theoretical posit and rely on evolutionary intuitionism instead of the false theories it has historically relied on.