I think the best way to begin to understand this, especially for someone who is not from the United States, is to realize that Americans do not all think alike. The United States is a massive place, with differing populations throughout the nation. Some areas are inherently more religious than others, and the prevalence of different religions varies from area to area.
As for your question I’m going to attempt to explain that “back then,” American’s could be extremely religious, and it is not extremely different from the modern era. The best place to start is the background of the 13 colonies. From the very beginning of their founding, each colony really served a different purpose. Some colonies, like Virginia or Carolina, were more economic in nature. However, others were set up as areas for religious freedom. For example, Maryland was originally set up as a refuge for Catholics, Pennsylvania for Quakers, and every American has heard of the infamous pilgrims who came to Massachusetts and had the first Thanksgiving (Puritans). From the beginning, these prevalent religions had a major impact on the culture and politics of these colonies. By the time of the American Revolution, when states were drafting their own constitutions, many states had “religious tests” written into their constitution barring people from certain religions from holding office. At least nine out of the thirteen colonies had these tests at one point or another. An example of what this looked like in practice can be seen in the Vermont Constitution in 1777, “And each member, before he takes his seat, shall make and subscribe the following declaration, “I ____ do believe in one God, the Creator and Governor of the Diverse, the rewarder of the good and punisher of the wicked. And I do acknowledge the scriptures of the old and new testament to be given by divine inspiration, and own and profess the protestant religion.” [1]
The idea of eliminating religious tests completely did not really take hold until the Constitution of the United States was written in 1787. Article IV stated that “no religious Test shall ever be required as a Qualification to any Office or public Trust under the United States.” [2] But this proved to be a point of contention. Delegates in all states found issues with how the document dealt with religion (both in positive and negative ways), and delegates in Massachusetts, New Hampshire, and North Carolina all threated to not ratify the Constitution when it contained a specific ban on religious tests. [3] It is important to point out that the Constitution was ratified in 1788 without the Bill of Rights, this was the major fault that delegates found dealing with religion. The document stated religious tests were illegal for determining public office eligibility, but there was no explicit first amendment to protect freedom of religion. The Bill of Rights was not added until 1791.
So, by 1791, American’s have freedom of religion and no religious tests to hold office. However, the phrase “separation of church and state” doesn’t even appear until 1802 when it’s paraphrased from a letter written by Thomas Jefferson. “Believing with you that religion is a matter which lies solely between Man & his God, that he owes account to none other for his faith or his worship, that the legitimate powers of government reach actions only, & not opinions, I contemplate with sovereign reverence that act of the whole American people which declared that their legislature should "make no law respecting an establishment of religion, or prohibiting the free exercise thereof," thus building a wall of separation between Church & State.” [4] Separation of Church and State is not part of the US Constitution, though it’s often thought to be. The 1st Amendment in the Bill of Rights grants freedom of religion and states the government cannot pick one religion over another. There is no explicit part of the constitution that separates church and state. All the work on that front has been done by the US Supreme Court. In the original connotations of Thomas Jefferson, separation meant that the government would keep out of the church’s business, and the church would keep out of the government’s business. Jefferson and other framers feared the relationships between church and state that some European nations had, where the two used each other as tools for persecution. However, in today’s connotations, the term is used more frequently as an idea of keeping religion out of government. [5]
So, I’m assuming that this question overall is coming from the perceived rise of American Evangelism that some media outlets are claiming is occurring to the political right. The historical background for that is really rooted in the rise of the Moral Majority in the 1980s. Basically that was a movement created evangelist Jerry Falwell in 1979. It capitalized on the idea of unofficially connecting religion to politics by ensuring the politicians they supported were Christians. Think of it as a religious political action group, unaffiliated with the government, but supporting their candidate with votes and funding. With the successful elections of Regan and Bush in the 1980s, and the rapid growth of televangelism, Christian evangelicals and the Republican party entered into supportive relationship that is prevalent mostly to this day. That is why many Republican states are able to pass legislation that appears to support the Christian doctrine of thinking. The representatives themselves are not religiously bound to be Christian, but their voting base is mobilized to vote for politicians that think that way. Think of it as a religious test, but conducted by the voters, not the government.
But the overall moral of the story is that religion has been involved with government since the beginning of the United States. It just manifests itself in different ways.
Sources:
RELIGIOUS TESTS AND OATHS IN STATE CONSTITUTIONS, 1776-1784. Center for the Study of the American Constitution. University of Wisconsin-Madison, 2019. https://csac.history.wisc.edu/document-collections/religion-and-the-ratification/religious-test-clause/religious-tests-and-oaths-in-state-constitutions-1776-1784/
The Constitution of the United States: A Transcription. National Archives: America’s Founding Documents. U.S. National Archives. https://www.archives.gov/founding-docs/constitution-transcript
Maier, Pauline. Ratification: The People Debate the Constitution, 1787-1788. New York: Simon & Schuster, 2010.
Jefferson Thomas. Letter to the Danbury Baptists. Library of Congress, 1802. https://www.loc.gov/loc/lcib/9806/danpre.html
Hamburger, Philip. Separation of Church and State. Harvard University Press, 2002.