Stall eating is generally OK and some of the best food in the country can be found at inexpensive market carts. If they are clean then there is a good chance that it is safe to eat there. Avoid food that has been left out in the sun for long periods of time, especially fish. Most Thai food is cooked at very high temperatures which kills bacteria. Fruit should be peeled before eaten and vegetables thoroughly washed before consumption to remove any pesticide residue.
Local beer is fine as is tea and coffee practically everywhere.
Those adventurous enough to try stall food are sure to find an amazing array of choice and some delicious experiences. Safety Violent crimes against tourists are so rare in Thailand that they make international news. Having lived in the country for over 12 years I have never felt unsafe in any area, regardless of it's wealth level. Most crimes are petty such as pick-pocketing, credit card fraud and bag snatching. Even these do not pose a serious problem with a vast majority of the visitors.