Optic neuritis is an inflammation that affects the optic nerve, causing vision loss, eye pain, and changes in color perception. The condition can be associated with autoimmune diseases such as multiple sclerosis (MS) or infections, especially in immunocompromised individuals such as HIV/AIDS patients or those undergoing chemotherapy. In these individuals, optic neuritis usually results from opportunistic infections like toxoplasmosis and syphilis, complicating diagnosis and treatment. In immunocompetent patients, optic neuritis may indicate autoimmune diseases like MS or neuromyelitis optica (NMO), with better prognoses when treated early with corticosteroids. However, in immunocompromised individuals, the prognosis tends to be worse due to underlying infections and a limited response to immunosuppressive treatment. The management of optic neuritis involves anti-inflammatory therapies and, in cases of infections, specific antimicrobials. Continuous clinical and visual follow-up is also crucial. Studies suggest that clinical outcomes vary depending on the etiology and the patient's immune status, highlighting the need for personalized therapeutic strategies. Early diagnosis is critical to improving vision and quality of life for patients.