Still an open question as to whether it's an effective post-infection treatment - but there's good corelative evidence that people who are vitamin D deficient when they get infected do worse - and taking a supplement seems to work fine to raise levels.
I'd caution anyone taking D3 to also take K2. Google why.