Has many have already said....it depends on what's wrong.
A head cold will never keep me from riding. My sinus clears enough for me to breath again just from the activity of getting the horse ready.
I'll forgo riding for:
Stomach or intestinal problem
But for a cold I feel worse sitting at home than I do being out doing things. I don't go to work because:
A) I'll feel as bad sitting in my office as I do at home and
B) no one at work wants me to pass it on to them.
I'm not going to pay my Dr to tell me to drink plenty of fluids and get plenty of rest for the next week or two. I'll rest when I'm tired, ride when I'm not
and take an antihistamine to give me a clear sinus and knock me out for the night.
That's just me though. Everyone has to do what feels good for them. I love keeping my sinus cleared with the activity, so it works best for me. I'll even walk the dog in the evening to keep the sinus congestion down.