Yes, it matters what you wear to an exam: How dress influences your thinking
If you thought your what you wear doesn't influence your pattern of thinking, well, then unfortunately, you're wrong. It does.Researchers found that wearing "formal clothing" tends to make our thinking more abstract,
compared to a person who isn't wearing clothing so "formal". All this, and more, on this Nautilus article:http://nautil.us/blog/yes-it-matters-what-you-wear-to-an-exam
So, what that means for you is that if the situation (or your exam) requires you to think abstractly, like mathematics, you're better off in formal clothing.
Whereas, if you're sitting for an engineering exam, or are restoring a car, abstract thinking probably isn't a very good idea, so, dress down (to make your thinking less abstract, help yourself). And when everyone is dressed the same, whether formal or informal? It's a level playing field.
Oxford University continues with the formal subfusc being mandatory for students taking exams, and schools stick to uniform. It just ensures everyone's thinking pattern isn't influenced by dress, so you get a level playing field,
something that wouldn't happen if you let people chose their dress while attending an exam.