He was supposed to read a speech approved by the school but instead he disregarded their direction and lead the audience in a prayer and that constitutes government endorsement. He can stand in the hallway and recite prayers until he is blue in the face but when he stands at a school podium at a school graduation over a school PA system, he can't. He could have even gotten by if he spoke about how religion helped him be a successful student but the prayer was over the line (and was he really showing true christian behavior by lying to the school about his intentions in reading that prayer? - what he did was a real "**** you" to the school and others in the crowd). People have the right to come to school functions and not be subjected to any religious indoctrination.
Congress shall make no law respecting an establishment of religion, or
prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances.
He was not an agent of the government. He was exercising his rights as a private citizen. A private citizen reciting the Lord's Prayer, in no way indicates the establishment of a State religion regardless of where he was.
The first amendment is numero uno for a reason.