Vitamin D levels are lower in TB, and linked with resistance to and recovery from the clinical disease. This is most likely related to the vitamin's immunological functions.
Vitamin D has been used as part of clinical treatment for TB for over 50 years, but the few good quality RCTs do not collectively provide any clear answer on whether it is effective in this role.