I doubt any have formal dress codes and the most important thing at school is to learn.
But like it or not, people form an impression based on how you present yourself and, once formed, they can be tough to change. And law school is a professional school. The professors who see you now might be the ones you need to recommend you for an internship, clerking position, or job with a firm later. The students you are in class with now could be your source of referrals, contacts, job opportunities, or opponents in court 10 years from now. You might want to keep that in mind as well.