In 1967, the Tennessee public schools were threatened with another lawsuit over the Butler Act's constitutionality, and, fearing public reprisal, Tennessee's legislature repealed the Butler Act. In the following year, the Supreme Court of the United States ruled in Epperson v. Arkansas (1968) that Arkansas's law prohibiting the teaching of evolution was in violation of the First Amendment. The Supreme Court held that the Establishment Clause prohibits the state from advancing any religion, and determined that the Arkansas law which allowed the teaching of creation while disallowing the teaching of evolution advanced a religion, and was therefore in violation of the Establishment Clause. This holding reflected a broader understanding of the Establishment Clause: instead of just prohibiting laws that established a state religion, the clause was interpreted to prohibit laws that furthered any particular religion over others. Opponents, pointing to the previous decision, argued that this amounted to judicial activism.
In reaction to the Epperson case, creationists in Louisiana passed a law requiring that public schools should give "equal time" to "alternative theories" of origin. The Supreme Court ruled in 1987 in Edwards v. Aguillard that the Louisiana statute, which required creation to be taught alongside evolution every time evolution was taught, was unconstitutional.
The Court laid out its rule in Edwards as follows:
The Establishment Clause forbids the enactment of any law 'respecting an establishment of religion.' The Court has applied a three-pronged test to determine whether legislation comports with the Establishment Clause. First, the legislature must have adopted the law with a secular purpose. Second, the statute's principal or primary effect must be one that neither advances nor inhibits religion. Third, the statute must not result in an excessive entanglement of government with religion. Lemon v. Kurtzman, 403 U.S. 602, 612-613, 91 S.Ct. 2105, 2111, 29 L.Ed.2d 745 (1971). State action violates the Establishment Clause if it fails to satisfy any of these prongs. -- Edwards v. Aguillard
The Court held that the law was not adopted with a secular purpose, because its purported purpose of "protecting academic freedom" was not furthered by limiting the freedom of teachers to teach what they thought appropriate; ruled that the act was discriminatory because it provided certain resources and guarantees to "creation scientists" which were not provided to those who taught evolution; and ruled that the law was intended to advance a particular religion because several state senators that had supported the bill stated that their support for the bill stemmed from their religious beliefs.
While the Court held that creationism is an inherently religious belief, it did not hold that every mention of creationism in a public school is unconstitutional:
We do not imply that a legislature could never require that scientific critiques of prevailing scientific theories be taught. Indeed, the Court acknowledged in Stone that its decision forbidding the posting of the Ten Commandments did not mean that no use could ever be made of the Ten Commandments, or that the Ten Commandments played an exclusively religious role in the history of Western Civilization. 449 U.S., at 42, 101 S.Ct., at 194. In a similar way, teaching a variety of scientific theories about the origins of humankind to schoolchildren might be validly done with the clear secular intent of enhancing the effectiveness of science instruction. But because the primary purpose of the Creationism Act is to endorse a particular religious doctrine, the Act furthers religion in violation of the Establishment Clause. -- Edwards v. Aguillard