I just took my kids to a regular dental checkup and one kid usually gets cavities and the other one (who never takes good care of her teeth) has perfect teeth!
The dentist said that besides a good diet and regular brushing (drinking plain water helps after eating) it's really based on their genes. I guess one kid inherited my horrible genes and the other got my husband's -- he's never had a cavity and rarely gets sick!