By the federal government. The whole intent was to allow the sovereign states the ability to make their own state religions without it being dictated from the federal government.
However, the 14th Amendment is generally construed to mean that anything specifically prohibited to the federal government is also prohibited to government at all levels. (Of course, they always try to avoid applying anything to a true 2nd Amendment test.)
The first-amendment explicitly states "congress", so since most states don't have congresses [assemblies or the more general "legislature"]; so unless you want to give the courts the incredible power of magically translating text from what is written I wouldn't push that line of reasoning.