Eating lots of veggies and fruit, avoiding sugar and white refined junk, and getting plenty of sleep keep me quite virus-free, despite the fact that I have three young children. Colds for me are usually no more than an annoyance that last a day or two; I even had H1N1 last fall and it was no big deal.
If your immunity feels like it's not to the level it should be, perhaps look at improving your diet and your sleep.
When I am a little sick (like this past weekend, I had a sore throat), I work out anyways. There's no reason not to work out when I'm only a little bit sick.