IMO, during the times that your body needs energy to combat illness, it won't be capable of providing the energy required to build muscle.
For me, I will generally continue to workout during a mild cold, but I've found from experience that if I have a fever, such as during the flu, I'm better...