When you eat or drink, bacteria use the sugars in the food and one of the by products is acid. The sticky plaque holds this acid against your teeth where it attacks your tooth enamel, leading decay and cavities.
Don’t make a habit of having frequent sugary snacks, including hard candy and other snacks that contain sugar.