to be a little more specific, it prevents the federal government from establishing or interfering with religious liberties. States are another matter. If I remember correctly it was Delaware that officially ended its state religion in the ‘50’s or ‘70’s, ending the last state religion. Could be wrong about Delaware, but there was one state that ended its official religion that late.
I believe that your definition of "state religion" differs from mine as the 1st Amendment's religion clause speaks towards an "Established" religion where the government favors a specific one and makes provisions for its support. Modern example is Iran's Theocracy and the Shi'a sect of Islam.
The closest I can find in the US States is *probably* what you are recalling, a requirement of/for exclusive 'religious' oaths, as in court or in taking office. Maryland had the last law that made such the only legal oath and it was overturned in a 1961 US Supreme Court decision, [Torasco v. Watkins, 367 U.S. 488, 1961]. Current common usage in these circumstances is the wording "swear or affirm".