The establishment clause in the First Amendment has been part of a contentious debate for the past century with regards to many areas, including public funding, teaching evolution in schools and prayer in schools. Most of the interpretations behind the Establishment Clause center around Thomas Jefferson's 1802 letter to the Danbury Baptists, in which he emphasizes a "wall of separation" between church and state.
There are two main interpretations of what Jefferson meant in his letter by "wall of separation" – the accommodationist view and separationist perspective.
Accomodationalists believe that the wall is porous and allows for certain exceptions, such as funding religious organizations that provide secular functions or a hospital owned by a society of Catholic nuns. The separationists believe that the wall is non-porous and does not allow for any type of mingling between the state and religion. These two views have fought over final decisions in the Supreme Court for almost a century now.
It wasn't until 1947 that the Supreme Court was able to have some semblance of a test dealing with issues on the Establishment Clause. The Everson v. Board of Education case triggered the court to construe some meaning from the Establishment Clause and the "wall of separation." At question was a New Jersey law which required reimbursements to be issued to parents whose children used public transportation to and from public or private schools. Since some of the money went towards transporting children to religious private schools as well, a taxpayer sued. The Supreme Court ruled in a 5-4 decision in favor of New Jersey to uphold the law. The court reasoned that there was a firm "wall of separation" between state and religion, but New Jersey's law essentially had a secular purpose, which was providing transportation to children. The aid was not directly paid to religious institutions, and the reimbursements went to the parents.
Even though the Supreme Court didn't create a full legal test, the Everson case provided a base for upcoming Establishment cases.
In 1962, Engel v. Vitale led the Supreme Court to strike down a state law which allowed teachers to prompt students to pray in the classroom. The Engel case was closely followed by Abington v. Schempp, which centered on a Pennsylvania state law that required Bible reading in public schools. The Supreme Court struck down the law since it advanced Christianity.
Then, the court has created a two-pronged test addressing ambiguity in the Establishment Clause. The first part of the test determines whether there's a secular policy goal in the government's law, and the second part deduces whether the law advances or inhibits religion. Even with this seemingly complete test, the Burger Court would add another prong.
Chief Justice Warren Burger used the decisions in Everson and Abington to create a new test in Lemon v. Kurtzman. The Supreme Court struck down Pennsylvania's Nonpublic Elementary and Secondary Education Act, which allowed for state funding for non-public schools in the form of textbooks, teacher salaries and so forth because Chief Justice Burger reasoned that the program would cause an "excessive entanglement" between government affairs and religion. The new assessment – dubbed the Lemon Test– now asks whether or not a program has a secular purpose, neither advances nor inhibits religion nor involves "excessive entanglement."
In just 24 years, the Supreme Court was able to formulate a test to preside over contentious cases addressing religious involvement in the state. Even with a multi-pronged test, the Supreme Court still has to navigate through increasingly complex Establishment Clause cases today.