Personally, I'm not sure public nudity laws have much justification, beyond some concerns with spreading germs, and I'm certain that laws telling people they can't wear their pants low and baggy have no justification either. But, I have this general thing about laws not being used to enforce morality.
On the other hand, I do think that laws made for the protection of public health are on pretty solid legal ground.