This was embodied partly in the writings of John Locke. Freedom of conscience to worship as one pleases was a major issue at the time - the Church of England's persecution was the major factor in the Pilgrims coming to America in the first place. So, the founders understood that you cannot force someone to believe anything. Religion is a matter of conscience between a person and his God - how do you regulate thought (maybe I should ask N.O.W. or the ACLU or gay activists, hmm); behavior isn't.
Even in the colonies, heresy and breaking the Sabbath were punished - often harshly. This continued well after 1787. But we recognized, in a very well-reasoned way, I might add, that these proscriptions weren't entirely right and, in some cases, not consistent with the religious freedom that is a bedrock of our Republic. At the time of the Convention, in Maryland, Mennonites and Quakers were not allowed as witnesses in capital cases, because there religion forbade them from taking an oath - an the "affirmation" they were allowed in other cases just wasn't good enough for a capital case.
Not to belabor, which I could. The point is that we have changed a great deal from the beliefs which formed the framework of values used by the Founders in drafting the Constitution. Not all of those changes are unwelcome. Some of them result in more freedom, some in less. Given the choice - where the government is concerned - I'll take more. For while God may be inerrant, government is most certainly not, and if I give them the power to control others with whom I do not agree, that same power may well be turned against me. Too much liberty certainly has its price, and can be exercised in ways that we may find disgusting - but if people use that liberty to violate God's laws, I am happy to leave their reckoning to Him - especially where letting the government stick their nose in the matter gives them more control over me.