I've been watching this thread with interest and a bit of amusement. Lots of wisdom here and it seems to me that a distillation of some of that is simply that the gig ought to dictate the attire every bit as much as the music selection does.
Know what your audience wants and expects and there's your answer. Vince may be able to be the exception to that rule but I'll stick my neck out and guess that few of us on this forum can claim his level of influence...
Given the choice, I'd probably play in shorts and tee-shirts every night that the temperature allowed it. Since I actually like to work as much as my schedule allows, though, I don't do that outside of studio work. Unless the shorts-and-tee-shirt look happens to be right for the band and the venue - which, thankfully, it is at least now and then - I'm wearing whatever the gig happens to call for.
As just one example, I certainly wouldn't normally wear a western hat to play in since it's my longstanding belief that that
no one will ever look goofier in a hat of any kind than me. But one of the bands I play in wears hats and vintage western wear; it's simply part of the price of admission to playing in a band I love. I think of it as a costume rather than a uniform and I'm fine with that. (Now, like Mike N., I might well draw the line at wearing a uniform but that's not been asked of me in decades so I guess, if I'm honest, that's actually untested.)
The only genre I can think of these days where you see a band in cut-offs and tee-shirts followed by a band in suits and ties, followed by a band in nice/casual streetwear - and you only rarely hear grumbling about what any of them are wearing - is bluegrass. Otherwise, if you know who your audience is, you probably know what you can (or ought to) be wearing just like you presumably know what you ought to be playing.
There is, of course, no reason to feel bound by any dress guidelines whatsoever. However, after a point - unless your audience expects the unexpected - it's gonna affect how much you work. (And, I'd argue, if your audience
does expect the unexpected, then you're back to knowing what your audience wants and expects anyhow. You'll be fine.
)