No, public school students may not be compelled to recite the Pledge of Allegiance. In its 1943 decision West Virginia Board of Education v. Barnette, the U.S. Supreme Court determined that the First Amendment protects a student’s right not to engage in certain speech. The First Amendment generally prohibits the government from punishing people for engaging in certain speech. In Barnette, the high court extended the reach of the First Amendment to also prohibit the government from compelling speech.
The high court determined that a group of Jehovah’s Witnesses, who objected to the flag salute and mandatory pledge recitation for religious reasons, could not be forced to participate.
In oft-quoted language, Justice Robert Jackson wrote: "If there is any fixed star in our constitutional constellation, it is that no official, high or petty, can prescribe what shall be orthodox in politics, nationalism, religion, or other matters of opinion or force citizens to confess by word or act their faith therein."