Simple answer is no – there are no written rules/codes; but a real answer is yes.
A district court judge in Columbia County, Pennsylvania recently posted a sign outside of the courtroom that read, “Pajamas are not appropriate attire for district court.” Although it seems comical, it is a good reminder.
Whenever you have to appear before a judge in court, you need to remember that your attire leaves a lasting impression on the judge deciding your case. If you appear in pajamas and look like you did not take the time to get ready for the day, the judge could perceive that you are disinterested in your own case. If you appear in a three-piece suit with designer labels everywhere, a judge could perceive that you are wealthy. If you appear in work clothes because you are coming from work and going back to work, a judge could perceive that you are a hard working individual dedicated to work and your case.
Do not be afraid to ask your attorney what you should wear to court. A good attorney will counsel their client about appearance prior to going to court. We live in a culture where appearance (good, bad, right or wrong) can play a part in your case.