Depends on what the shirt says.
If it’s protected speech, then yes they do.
If it’s nonsense, they they do not.

Note that it doesn’t matter if it’s offensive or not, Legalize Marijuana (or, say, Revive the Nazi Party) is more protected then lolcats or Chuck Norris jokes, because the former examples are political speech, and the last two aren’t.
Also note that all rules here only apply if you’re willing to take a case up to the supreme court, a lesser court may not side with you.
And I also may be wrong about the offensiveness as the supreme court has only ruled that minors have the right to free speech and not that it necessarily works the same way as adult free speech.

However

No they do not violate the first amendment. Those who believe that such acts do violate the First Amendment have a mistaken belief as to what the First Amendment is and is intended to accomplish.

It is important to understand the Founders’ intent for the Bill of Rights, of which the First Amendment is the First Article. The Bill of Rights was not intended as a list of rights but rather intended to place controls on the federal government. Consider, the first eight ratified articles of the Bill of Rights are exclusionary in the nature of their structure and intended impact. That is, these first eight articles expressly exclude the federal government from certain acts. The final two articles are basic truths of rights.

Notice, that the Bill of Rights was intended (by the Founders) to control the federal government and in so doing protect both the States and individuals from an overreaching and intrusive federal government. It was not meant to place controls on State governments, individuals or private organizations. All nonpublic schools were never intended to be impacted by the Bill of Rights. Since schools are either part of local or State government they too were intended to be exempt from the Bill of Rights. As an aside, the federal government was never delegated any power to have anything to do with schools.

This Founder intent can be found in the cases of Commonwealth (Massachusetts) v. Blanding [1825] and Respublica v. Oswald (Supreme Court of Pennsylvania) with a consensus of the following: “. . . . The main purpose of constitutional provisions like the First Amendment was said to be, to prevent all such previous restraints upon publications as had been practiced by other governments. . . . . . ”

With the advent of the 14th Amendment this perspective began to change with the increasing intrusiveness of the federal government (post civil war) and The federal government applying the Bill of Rights to State government. This became most obvious within the times of World War I with the case of Schenck v. United States [1919] with the words, ” . . . The question in every case is whether the words used are used in such circumstances and are such a nature as to create a clear and present danger that they will bring about the substantive evils that Congress has a right to prevent. . . . ”

In our times the First Amendment is being applied to State government and its environs (incorrectly in my opinion) but with the added caveat that freedom of speech is not absolute. That is, when it causes or incites harm to others or to property it can be restrained. Add to that the purpose of a school which is to educate. In that context the school has every right to control those things including dress (inclusive of T-shirts) that the school deems as negative to the teaching environment.

Finally, the schools we are discussing are for the education of minors and minors do not have the full rights (or responsibilities) of adults. Even so, when those (including minors) who believe that the school administration has overstepped its authority, they have a path of redress. That is, as with any citizen, they can petition the Board of Education. If they disagree with the decision of the board of education, and if they have legal standing, they can go to the courts.

p