If the Shoe Fits
Stick & Rudder has the right idea. I can certainly see wearing a professional looking uniform in a terminal area if you fly for an airline or even a corporate flight department. The image of professionalism is important to convey. If you're in a GA aircraft, a uniform with 4 stripes, tie, epaulets, hat, etc. is w-a-y out of place and at a training academy....plueeezze.
Once we get in the cockpit and close the cockpit door, ties are OFF , shirts unbuttoned and we get comfortable. Even the female pilots go along as comfort is most important. I had to ferry an aircraft recently (767) and the crew wore polo shirts with comfortable slacks. Looked good and was way too comfortable.
G'Day Mates