Yogurt is safe to eat after being unrefrigerated for 24 hours or less. The most common way in which unrefrigerated yogurt goes bad before its "best before" date is the formation of mold on the surface.
It may be safe to skim mold off the top of yogurt and eat the remaining product, but it is not recommended.
According to Green Energy Efficient Homes, yogurt contains live bacteria that eat milk sugar, or lactose. The bacteria convert the lactose into lactic acid, which then causes curdling in the milk, turning it into yogurt. Acidic foods like yogurt are less prone to spoiling than are alkaline or neutral foods, but mold growth in an acidic food can reduce the acidic quality, making foods like yogurt susceptible to other forms of spoilage, including botulism.