I’d never given this much thought until recently when somebody asked me if it was acceptable for men to wear shorts in Bangkok. They’d read in a travel forum that it was only appropriate to wear shorts on the islands and in the beach resorts and not in cities like Bangkok and Chiang Mai.
Appearance is important to most Thai people, but so is being practical. Thai people are used to the heat and humidity and appreciate that many foreign tourists are not. I don’t think many Thai people will take offence if a male tourist is wearing shorts if the shorts are neat, clean and a reasonable length (at least knee-length). It’s certainly true that if you are on the Skytrain at rush-hour in your shorts and sandals you will stick out amongst the locals who will be wearing smart shirts and trousers.
If you are visiting temples or decent standard restaurants you should definitely wear long trousers. Lightweight cotton slacks are a good item to pack in your bag for your trip to Thailand. By wearing long trousers in urban areas you will certainly make a better impression, but that has to be balanced with feeling comfortable. As they say in Thailand, ‘up to you’.