If your flu or cold include the symptoms of muscle pain, headache, sore throat and fever, then a training session will not only hurt your muscle growth but also your health. Even though that training builds on your muscles, burns of calories and gives you more energy, then your body is still when sick, in a catabolic state during the workout. That the body is in a catabolic state means that your body is in a reactive phase, e.g. breaking down your muscles during exercise and building them up in the period after your workout. So during a flu or cold your body is also in a catabolic state, so if you start exercising when you are sick it does more harm than good, simply because your body has no energy and resources to get well and your immune system will be even more attenuated.
Based on this it is not healthy to train when you are sick, but more important to concentrate on getting rest, eat healthy and drink water. When you then are completely healthy again you can start out slowly. Do not start with working out as hard just before you got ill, the first week after illness you shouldn’t push yourself to hard. Increase the intensity more and more after, and then during the third week you should be back at normal level.
Just remember not to make it harder for your immune system to fight the virus you have gotten in your body, which is the reason you are in a catabolic state. So you can do yourself a favor by not exercising during illness and you will recover faster.