An Apple a Day Keeps the Doctor Away was an old saying to get a child to eat their fruits (and vegatables). Interestingly enough, there are some reasons to believe that this was a valid thought. According to http://www.hotfact.com/apple_facts.html a medium sized apple has only 80 calories.
Not only is an apple low in calories, they contain absolutely no fat. Thus, eating apples as snacks, as opposed to chips or cakes, will help reduce the risk of cancer.
On top of reducing the risk of cancer, the low sodium amounts in apples also help reduce high blood pressure and heart disease. They are cholesterol free. They are also rich in vitamin A, which helps strengthen vision along with bone and tooth development.
A close cousin was "'Eat an apple on going to bed and you'll keep the doctor from earning his bread" but this one didn't make it into our modern consciousness and usage as well.
A bad apple is often used to describe a troublesome person, coming from the one rotten apple spoils the whole barrel quotation. It is a truism since the mold spores from a bad apple does indeed ruin all the apples in the bunch.