The Thais have made the shift to western clothing and today most of the population dresses in this way. In some towns and villages there are people who still dress in more traditional clothing, but this is rare. Most of these clothes are styles particular to the region and most people prefer pants and long-sleeved shirts with sandals.
Despite the local dress, there are few dress restrictions in Thailand. Although few locals wear shorts, there is no discourtesy involved in wearing them as this is a cultural phenomenon, not a religious rule. Of course if you are visiting temples or other sights of particular religious or political importance you may be expected to cover up with long pants and shoulders should be covered at a minimum. Sunbathing naked or women sunbathing topless is rarely permitted; check with locals before doing so.