The ABA Journal recently published a piece on their website concerning the appropriate dress code in court. While the "Casual Friday" phenomenon has spread through many offices over the past twenty years, courthouses have remained stubbornly formal. The article cites instances where judges have had individuals removed from the courtroom and even threatened jail time for clothing deemed inappropriate for court.
As a general rule of thumb, you can not overdress for court. While a judge will not give anyone favorable treatment for dressing up, some judges may become annoyed with someone wearing a tee shirt, ripped jeans and flip flops.
Along similar lines, many of our courthouses in Massachusetts are older buildings with some hot rooms and some cold rooms. The take-away point: dress up, and wear layers.