Yogurt contains a large number of lactic acid bacteria, which refers to a large group of beneficial bacteria that have similar properties and all produce lactic acid as an end product of the fermentation process, but when we eat them with an empty stomach, lactic acid bacteria are easy to die in a large number while being in the stomach with higher acidity, thus losing part of the health effects.
After we eat some food, the acidity of the stomach decreases, so lactic acid bacteria can play a better role.
source: http://suhanijain.com/2012/09/22/why-we-should-avoid-yogurt-an-empty-stomachhealth-tips/