Yogurt is obtained by fermentation of the milk by specific lactic acid bacteria, which shall be viable, active and abundant in the final product Lactobacillus delbrueckii subsp. bulgaricus and Streptococcus thermophiles .
At the end of its manufacture until its consumption, the yogurt should be stored in the refrigerator at 40 °F (4°C) or below. Above this temperature, other bacteria and even harmful bacteria may develop.
At room temperature (below 90°F – 30 °C), yogurt can still be good up to 2 hours. But this break in the cold chain shortens the shelf life. If the room temperature exceeds 90°F, the yogurt is no longer good after 1 hour. 
How can I check if my yogurt is still good?
The 2 hours range seems rather short. To avoid waste, it is possible to check the quality of the yogurt. Signs that the yogurt has gone bad can be the presence of mold, a strange coloring (other than a pure white for plain yogurt), a strong unnatural smell. In this case, or even in case of doubt, the yogurt should be thrown away .
If your yogurt does not have these characteristics, but you see a little liquid on the surface of the yogurt, this is normal. It is a natural separation of the whey. You will just have to mix it in the yogurt to keep all the nutrients .
Is yogurt still safe after the sell-by date?
The sell-by date is the expected date when the yogurt may start to lose its taste quality. This does not mean that your yogurt is unhealthy. If it has been well stored in the fridge, the yogurt can be consumed up to 2 weeks after the sell-by date [2, 3].
Again, you can look at the appearance of the product. If everything looks normal, you can consume it.