Historically the states were indeed free to establish religions -- unless their own constitutions prohibited this, as most (I don't know how many) now do. Massachusetts was the last state to have such an institution. Their church (Congregationalist, I think) was disestablished in the 1840s. After the so-called Civil War, the US Constitution has been re-interpreted to "incorporate" most of the Bill of Rights into the 14th Amendment (no state can deny anyone life, liberty, and property without due process), so now it's not possible for a state to establish a religion, regardless of the state's constitution.