Officially in Thailand, although water quality likely is lower in rural areas, in urban areas like Bangkok, the water has met WHO standards for drinking for at least a decade:
In Bangkok, the Metropolitan Waterworks Authority (MWA) is responsible
for the public water supply. The quality of its tap water meets World
Health Organization (WHO) criteria and standards for drinking water
and is safe to drink in all serviced areas (Metropolitan Waterworks
In practice, however, as it is in many cities around the world, this water quality measure is only when the water leaves the water treatment plant. By the time the water makes it to the tap through kilometers of pipe of varying age and condition, it almost certainly will not be as clean.
Naturally, old cities, old neighborhoods, and old buildings can have old pipes. Old pipes can leak and rust as well as accumulate scale and sediment from the water itself. This can make the water less clean than it was when it left the water treatment plant.
In terms of specifics, the MWA displays the real-time water quality in each district in Thai in a chart and on a map on their website. If there were a particular issue with water quality or pathogens — after a flood, for example — it would be displayed accordingly.
Anecdotally, based on years of bouncing in and out of Bangkok, the local attitude generally is that tap water is acceptable for cooking, showering, and brushing your teeth, but not to drink. This observation vibes with a recent academic study, which found about half of locals in Bangkok view tap water as suitable to drink but far fewer actually drink it:
There was a significant prevalence (51.87%) of the acceptance of
drinkable tap water among Bangkok residents. Among them, 82.99%
selected tap water to drink and 9.79% drank water directly from the
As a foreigner visiting Thailand, though, it is best to always stick to bottled water. Because locals tend to be very particular about taste, restaurants often do use some degree of water filtering in the prep process and tend to buy commercially prepared ice, but it should not be assumed.
A good rule of thumb when traveling is that because your personal intestinal flora may not be in sync with the water in any given location, it is best to limit your interaction with tap water.