Illustration by Istra Fuhrmann, age 11.
I personally believe dressing professionally in class is important as I feel this shows respect for the students and also helps to role model for them how to be professional.An article in the Chronicle of Higher Education gives advice to faculty on how to dress for a job interview. As noted in the article:
Remember, the objective isn't to draw attention to what you're wearing but rather to draw attention away from your appearance and toward the substance of your candidacy. You want to be dressed neatly and appropriately enough that committee members say to themselves, "OK, this person looks fine, now let's see what he or she has to say." What you don't want is for them to spend the entire hour staring at your unusual dress or your garish tie, wondering what the heck you were thinking.
I would say the same is true for what we wear to our classes...
Here's some more on the subject:
Chronicle of Higher Education's A Call for Professional Attire.