In general, you can get by using common sense. Food in hotels and major restaurants is usually quite safe. On the street from sidewalk vendors, hot foods should be safe, as well as cooked foods which have been allowed to cool but haven't been sitting out all day and nite, and where there aren't flies. The main problems come from uncooked or poorly cooked foods, those which have sat out for a long time after cooking, and things handled by vendors who are not sanitary with their hands, such as fruits and vegetables.
Thai food is usually spicy. This is consistent with other tropical regions, and indeed started the spice trade centuries ago (before the technology of refrigeration), as some spices help to preserve food from rapid onset of bacteria. However, spices can also cause stomach upsets among the unaccustomed.
DO NOT EAT SHELLFISH! Repeat: Do not eat shellfish! Even if they're sold from your favorite grocery store or a nice restaurant, and all the Thais eat them in abundance and don't get sick at all, you should resist as an expat. Countless times, expats have gotten very sick, occasionally necessitating even ambulance and hospital treatment, while all their Thai dining companions were unaffected at all. Several expats have also gotten sick after Pizza Hut seafood pizzas, but none have when the mussels were removed. "Mai ow hoy." (Don't want mussels/oysters.)