Drinking water is good for when you have a cold or flu virus as the water helps to flush out germs and other toxins in your body and helps clean your immune system so in a way you're flushing out the cold virus by drinking plenty of water.
The water itself won't completely flush out the cold virus and make it go away any sooner but it's still good to drink plenty of water when you have a cold or flu because the water helps keep your body hydrated.
When you have the cold or flu your body needs more water to stay hydrated because the cold and flu virus dehydrates you.
The water helps to flush out toxins as well and keeps your kidneys healthy so you should always drink more water than normal when you have a cold or flu.