The Supreme Court was absolutely correct to rule that a state-sponsored prayer in a public school graduation ceremony is a violation of the First Amendment to the Constitution. The history of the writing and adoption of the amendment 200 years ago and the unwavering precedents of the Supreme Court since it began applying the amendment to state and local governments 45 years ago make that as clear as -- well, as a revelation.
For over two decades the Supreme Court has applied a simple three-part test in determining whether state action breached the wall separating church and state erected by the First Amendment: "Congress shall make no law respecting the establishment of religion, or prohibit the free exercise thereof. . . ." The test is, does the action (1) serve a purely secular purpose, (2) neither advance nor inhibit religion and (3) avoid excessive government entanglement with religion? If it fails to do even one of those things, it is unconstitutional.
In the case involved, a Rhode Island public junior high school principal, with the approval of the school committee and superintendent, invited a rabbi to deliver a prayer at graduation exercises which students were expected and pressured if not legally required to attend. The official also gave the rabbi guidelines on what the prayer could and could not say. The prayer gave God thanks for providing "liberty" and "the political processes of America" (including "its court system"). This prayer in this setting arranged this way violated all three parts of the test.