Once breastfeeding is stopped, the baby stops getting extra vitamins, minerals and of course antibodies. Thus, they are prone to colds more than babies who have been breastfeed longer.
However, after 3 children who were breastfeed and those who weren't are usually on the same level and both equally prone.
A good balanced diet should keep a babies immune system strong and healthy.