The Court developed the Lemon Test as a method to determine if a state law or action violates the establishment clause.
The test came out of the 1971 case Lemon v. Kurtzman. Pennsylvania passed a law that gave funding to private schools to pay for salaries, textbooks and materials that were used to teach secular subjects. The Court ruled the law unconstitutional on the grounds that the law would cause excessive governmental entanglement with religion. State officials would have to be present in the schools to ensure that the funding wasn't used for non-secular purposes. The Court would view the state's interference as "entangling" in the activities of the non-public religious school.
The Lemon test that the Court used has three major parts.
The first part is that the law must have a secular purpose to advance a goal. The law cannot inhibit or advance religion. The second part is that the primary effect is to not favor one religion over another or to not inhibit one religion over another. The third and final part is that there must be no excessive government entanglement with religion.
Alternatives to the Lemon test have used in Establishment Clause cases since 1971.
A major example is in the 2002 case Zelman v. Simmons-Harris. The case centered on a voucher program where parents could choose to have their children attend religious or nonreligious private schools if a local public school failed. The Court ruled that the voucher system did not violate the Establishment Clause under a different reasoning than using the Lemon Test. Chief Justice Rehnquist, in his majority opinion, stressed that the program did not favor any religion and that the voucher system was based on a private decision by the parent to choose what school their children could attend. The government did not tell parents what schools could be chosen for the program. The Court did not overrule the Lemon test, but the close 5-4 majority ignored to use it. In the aftermath, there is still confusion over whether the Lemon test is the true standard to test Establishment Clause cases as various other standards such as the one created in Zelman could be used instead.
Another alternative to the Lemon Test is former Justice Sandra Day O'Connor's Endorsement Test. The test depends on whether a reasonable person would perceive a government action as endorsing or favoring a religion.