I read an interesting article on this topic. You can find it here.
Babies that breastfeed have less dental cavities than those who were bottle fed.
Both mother's and cow's milk have lactose sugar, which can feed cavity causing bacteria if it's allowed to sit in the mouth for an extended period of time. If you are breastfeeding, and your child isn't getting a bottle all of the time you have nothing to worry about.
If possible try and breastfeed with you child sitting up. This helps prevent both cavities and ear infections. I wasn't able to do this until my babies were around 7 months.
There is more sugar in most of the formula's on the market; then what is found can be found in breast milk.
If you are giving your baby other things such as juice, then that dramatically ups their chance of getting cavities!
Night time feeding are discouraged because their natural rinsing saliva isn't as mobile during sleeping time. My babies took a long time to be night weaned. I worked full-time; so I took their nightly feedings as a sign that they were trying to keep my supply up. One thing that can be done to help avoid cavities, is to get a wet washcloth prior to their feeding. After your baby is done nursing, gently massage their gums or new teeth with the washcloth. It disturbs them less then a toothbrush, but does the job.
Mother's That Breastfeed Tend to Get More Cavities Then Ones That Don't
I hate to say it, but this is the case. Why? Because nursing mom's are hungry. When we get up in the middle of the night many mom's go for a snack. When you get the washcloth for the baby's gums, get yourself a tall glass of water! This helps suffice your hunger and builds back up your milk supply. If you're finding you need more, have an apple peeled and cut that evening before nightfall. Apple's clean your teeth. It doesn't do as good of a job as toothpaste, but apples are not going to cause cavities. Other veggie/fruits that are anti-cavity: Avocado, carrots, raspberry, strawberry and yellow plum.