Purpose: The advances in medicine have led to an increased number of people living with some form of immunodeficiency. Most ocular infections in immunocompromised patients may lead to irreversible blindness. We identify the causes of uveitis in immunocompetent and immunocompromised patients. Methods: A retrospective cohort study of 1354 consecutive patients. All patients underwent a standard work-up for uveitis. Results: An immunocompromised state was identified in 171/1354 patients (13%), of whom 40 had Human immunodeficiency virus (HIV) infection, 52 received immunosuppressive medications, 28 had concurrent malignant disorder and 20 had other causes for their immunosuppression. In addition, 93/1354 patients (7%) had diabetes mellitus (DM). The prevalence of intraocular infections was much higher in immunocompromised patients than in immunocompetent patients and DM (p < 0.001). Causes of uveitis differed between the diverse immunocompromised groups. The non-HIV immunocompromised patients showed primarily intraocular herpes simplex and varicella zoster virus infections, whilst HIV-positive patients exhibited frequently cytomegalovirus (CMV) retinitis and syphilis. Patients with generalized malignancies were characterized by a lower prevalence of infections and higher prevalence of sarcoidosis. Patients with DM typically showed sarcoidosis and bacterial intraocular infections. The percentage of undetermined uveitis diagnoses was markedly lower in immunosuppressed patients (p < 0.001). Conclusion: In immunocompromised patients with uveitis, infections were diagnosed in 46% of cases in contrast to 12% in the immunocompetent patients. The causes of uveitis differed among the various types of immunosuppression. Immunocompromised patients with uveitis require a rapid assessment for the most expected infections.