No it is not illegal for you to wear any t-shirt no matter what is written on it. If your in public that gives you even more of a right to display your "free speech".
"One persons vulgarity is anothers' poetry"
It goes something like that, I forgot the whole quote.
Congress had to act on this same issue a while back I forget the case though sorry. But, it ruled in favor of the free speech. (thankfully)