At least once a month I get a client who comes in, all dressed to exercise, with a cold, stomach virus, or some other illness. Much to their surprise, I inevitably send them right back home.
If you're sick, exercising is not going to make you better. It is going to use energy that should be going towards healing you, and will often make things worse. Case in point: I am a notoriously awful patient. I hate sitting still. I had to learn the hard way that I wasn't doing myself any favors. I remember one time, I had had a fever of about 103 for a couple of days, and hadn't been able to get out of bed. My fever finally broke, and I had some energy and an appetite. I took a shower, got dressed, and decided to take a leisurely stroll for a couple of miles. By the time I got home, my fever was back, and I was stuck in bed for another couple of days.
You can think of it another way, too: if your energy levels are down, you won't be able to work at your peak abilities, which isn't going to do you any good. You'd be better off resting till your strength is back.
If neither of these reasons are striking a chord with you, then at the very least, think of other people. You are coming into a sweaty breeding ground for bacteria with plenty of people who will be touching everything you touched, breathed on, sneezed near. No one wants to catch what you have, so for the sake of everyone else working out in your area, please keep your germs out of the gym.
Rest is the best possible thing you can do for an illness. Give yourself a break. Your body is trying to tell you something, and that something is not, "Work through it!!" Get some sleep, drink plenty of fluids, watch soap operas, and relax. In an ideal world, no one would ever get sick. Unfortunately, this is not an ideal world, and sooner or later, you'll likely catch something like a cold or flu. You're not weak, lame, or pathetic for taking care of your body. Just like a marriage, you need to be there for yourself in sickness and in health. If you take care of yourself, your illnesses will not last as long, you'll be back to full strength before you know it, and hopefully, you'll be able to fend off further illnesses more easily.