How can a healthy diet help prevent illness?

How can a healthy diet help prevent illness?