School-sponsored prayer at graduation ceremonies for public school students is unconstitutional. The hard issues center around "spontaneous" prayer from students or other speakers.
If district personnel are aware that a speaker intends to infuse his/her speech with a religious message or intends to lead a prayer, the district will be committing a violation of the Establishment Clause of the First Amendment if the district does not take steps to prevent the prayer or other religious message. Letting students and all other speakers know in advance that religious speech and prayer are not allowed is permissible and smart. No one benefits spiritually when prayer is forced upon a captive audience at a school-sponsored event designed to recognize graduates.
Remember that a district may permit a baccalaureate ceremony with religious content when the event is sponsored and organized by private parties and student attendance is not mandatory (nor even encouraged by the district). The ceremony may be held on district property only if the district allows a similar opportunity to any private group that makes a similar request.