When we eat food containing sugar, then the bacteria present in our mouth break down the sugar to form acids(such as lactic acid). Thus acid is formed in the mouth after a sugary food has been eaten. This acid lowers the pH in the mouth (making it acidic) . Tooth decay starts when the pH of acid formed in the mouth falls below 5.5. This is because the acid is strong enough to attack the enamel which is made of calcium phosphate and thus enamel start getting corroded when the pH is lower than 5.5.