Politically speaking, I don't think anyone should be forced to participate, but if the majority of the kids in a school want it, I don't think it should be prohibited.
Personally, I would prefer that it be left out, but it would depend on what is being expressed, as to whether or not I thought the prayer was ok, or crossed the line.
A prayer that was generally inclusive, like an expression of gratitude for the teachers and for education and/or an expression of the desire for students to be guided to have good lives as they go forward it life, would be ok with me.
A prayer that was asking for something on behalf of students that I thought was inappropriate, like: "may each of these students be born again in Christ" would cross the line for me, since I think that would be more about a particular belief system than about graduating from high school.