AFAIK, there is not a LAW that says that the pledge should be recited; however, this may be a requirement of the individual states. I seem to remember a discussion about that a few weeks ago.
I'm sure someone can remember this one - where the conservative kid, I think he was in Santa Monica, asked one of the administrators about the recitation of the Pledge, and noted that the state required it.
I can't remember the kid's name, nor the details - he appeared on Larry Elder's show and got called on the carpet for it.