If you feel a good bit of pain while riding, don't ride. If you're sick enough where your ability to safely balance, watch traffic, and make safe traffic decisions, is truly impaired (and not just because you're being lazy) then don't ride. If medical professionals say that whatever you're sick will be aggravated by lack of rest, don't ride.
Otherwise, ride. Exercise cures many ills.