In this comment it was suggested that teaching in your underwear is a bad thing. While in general, I think academics are accepting of a wide range of dress (there are people in my department who teach in suits and others in ripped jeans), I am not sure a nudist or teaching in your boxers would be acceptable.
Part of me thinks there is the issue of sexual harassment, but I think if it is your style, it is not harassment. Can an academic really wear, or not wear, what they want? Let's assume that it is a state university and therefore not public nudity or that you are in a state/country that allows public nudity.
I am interested in the ethical/professional side of teaching in the nude. I am assuming that someone who wants to teach in the nude would understand the legal implications and how it affects their productivity.