Although I don't approve, yes, you can. And that is thanks to the Tinker v. Des Moines case.
Tinker v. Des Moines Independent Community School District was a landmark Supreme Court case. The Supreme Court's decision affected the lives of students in every US public school.
So what happened?
On December 16th of 1965, Mary Beth Tinker and a friend, Christopher Eckhardt, wore black armbands to their high school in Des Moines to silently protest the Vietnam War. They were sent home, and the next day, John Tinker, who was Mary's brother, was sent home after doing the same thing.
So what happened next?
The parents of the students, who were the plaintiffs, sued the school district for violating the 1st amendment, which was the right of expression. The school, on the other hand, said that the school was just maintaining discipline. The case eventually reached the Supreme Court.
So what was the Supreme Court's final decision?
The Court sided with Tinker, 5 to 2. They said that banning a symbol that expresses your opinion violates the 1st amendment and that students didn't shed their 1st amendment rights when stepping onto school property. They also said that schools could only ban things that disrupt a teacher's ability to teach.
Oh... So that's why I can wear a MAGA hat to school.
Just keep in mind that there is a difference between silent, symbolic protest and protest using words and actions.