When the U.S. Constitution and its first ten Amendments were written, the authors included guarantees of religious freedom among the federal civil service and officeholders. Article 6 of the Constitution states:
"No religious test shall ever be required as a qualification to any office or public trust under the United States."
Inclusion of this clause was probably partly motivated by the large number of non-Christians among the authors of the Constitution, including many Deists.
However, many state constitutions -- when originally written -- required officeholders to believe in a God (or Gods or a Goddess, or Goddesses, or a God and a Goddess, or Gods and Goddesses). Most Constitutions didn't specify the number or sex.
After the 14th Amendment to the Constitution was proclaimed on 1868-JUL-21, its Article 6 became binding on individual states. The religious requirement clauses in state constitutions became null and void. The 14th Amendment stated:
"No State shall make or enforce any law which shall abridge the privileges or immunities of citizens of the United States."
Still, the clauses remain on the books in a few states AR, MD, MA, NC, PA, SC, TN & TX), and are occasionally dusted off in the media when someone wants to bash Atheists, Agnostics, etc.