Yes, a diet high in sugary and acidic foods can contribute to the formation of white spots on teeth by eroding enamel. Maintaining a balanced diet while limiting such foods is essential for healthy teeth.