It is essential to dress appropriately when attending court. Like everything else in life, people are judged based on their appearance. When a person is a party to a lawsuit, criminal case, or traffic ticket, they are very often judged by the first impression they make. For all those who protest the unfairness of the former statement, please address your complaint to Charles Darwin or Intelligent Design theorists. I am discussing reality here, and reality is that we are all judged by our physical appearance.
That being said, the uniform must fit the task at hand. Lawyers are expected to wear formal business clothing. Litigates have other choices.
The Right Clothing Choices for Attending Court:
If you are attending court for a traffic ticket, "business casual" dress is perfectly fine. You may also wear jeans and a tucked-in shirt, or jeans and a plain t-shirt or polo-style shirt.
If you are attending court as a witness in a criminal or civil case, you should wear attire that will cause a jury to take you seriously. I suggest you wear traditional business casual clothing. That can include, but is not limited to slacks and a long-sleeved shirt for men, and dresses and skirts for women with a nice top, or a conservative suit.
If you are a litigant in a civil case, business casual (as described above) is perfectly fine.
If you are a criminal defendant for anything other than a traffic ticket, wear formal business attire. Men should wear suits or slacks and a blazer. Women should wear a suit, a shirt or blouse, or a dress that at least comes to the knee.
Remember; no one will take you seriously if you do not look as if you take court seriously. Your appearance matters when you want to have the best chance of success in your case.