Bluefreedom said it.
Regulations vary slightly from service to service, I was Coast Guard, in our case wearing the uniform was allowed travelling from and to.
e.g. If I was stationed in Cali. and lived in another state, taking off on a Friday to go home I would wear uniform on my way home, and the way back, wearing uniform in between, no no.
Only exception would be formal events, like attending a wedding or something.
I totally concur with Bluefreedom, whilst I understand being proud of the service, wearing the uniform inappropriately is nothing short of unprofessional and unbecoming.