There are very few limits of officially sanctioned prayer, according to this decision in Town of Greece vs. Galloway. In fact, "Absent a pattern of prayers that over time denigrate, proselytize, or betray an impermissible government purpose, a challenge based solely on the content of a prayer will not likely establish a constitutional violation."
Typically, questions about whether or not government action is establishing religion is decided by a legal test. The Lemon Test, the most famous of these, asks whether a law has a secular purpose, whether it's primary effect relates to religion, and whether it's an excessive entanglement of government and religion. Now the court has ruled, however, that officially offered prayers at government meetings are not subject to such tests.
Prayers can be entanglements without establishing religion.
Prayers can be primarily religious.
Prayers don't have to be secular, serving only to solemnize or something like that.
Justice Anthony Kennedy, writing the opinion for the majority, cited the 1983 Supreme Court case Marsh vs. Chambers in explaining the decision. Formal tests, like the Lemon Test, are not necessary when the practice has a long-established history. Tradition trumps.
As Kennedy wrote:
Marsh is sometimes described as 'carving out an exception' to the Court's Establishment Clause jurisprudence, because it sustained legislative prayer without subjecting the practice to 'any of the formal "tests" that have traditionally structured' this inquiry. The Court in Marsh found those tests unnecessary because history supported the conclusion that legislative invocations are compatible with the Establishment Clause . . . Marsh stands for the proposition that it is not necessary to define the precise boundary of the Establishment Clause where history shows that the specific practice is permitted. Any test the Court adopts must acknowledge a practice that was accepted by the Framers and has withstood the critical scrutiny of time and political change. A test that would sweep away what has so long been settled would create new controversy and begin anew the very divisions along religious lines that the Establishment Clause seeks to prevent. Marsh, indeed, requires an inquiry into the prayer opportunity as a whole, rather than into the contents of a single prayer.The only remaining test, according to the Supreme Court, is coercion. Officially authorized government prayer would be an unconstitutional establishment of religion if -- and basically only if -- people were coerced into prayer.
Prayer at public school ceremonies, for example, is not different because it's considered coercive.
Justice Clarance Thomas wrote a concurring opinion that stakes out a more originalist version of the idea of coercive religious establishment. According to Thomas, a religion is only established by a government, for the purposes of the U.S. Constitution, if that government forces people to participate in religious practices. This was the practice of some states at the time of the nation's founding and the Fourteenth Amendment. This should be understood as the context of what the law means by "establishment of religion."
Coercion only counts, Thomas says, if it's legal coercion.
He writes, "there is no support for the proposition that the framers of the Fourteenth Amendment embraced wholly modern notions that the Establishment Clause is violated whenever the 'reasonable observer' feels 'subtle pressure' or perceives governmental 'endors[ement].'"
The court will revisit this question of coercion soon. The justices are scheduled consider a case concerning whether or not a public school can hold a graduation in a church later this month.