Prostate cancer (PCa) is a type of potentially fatal malignant tumor. Immunotherapy has shown a lot of potential for various types of solid tumors, but the benefits have been less impressive in PCa. Enhancer of zeste homolog 2 (EZH2) is one of the three core subunits of the polycomb repressive complex 2 that has histone methyltransferase activity, and the immune effects of EZH2 in PCa are still unclear. The purpose of this study was to explore the potential of EZH2 as a prognostic factor and an immune therapeutic biomarker for PCa, as well as the expression pattern and biological functions. All analyses in this study were based on publicly available databases, mainly containing Cancer Genome Atlas (TCGA), Gene Expression Omnibus (GEO), UCSCXenaShiny, and TISIDB. We performed differential expression analysis, developed a prognostic model, and explored potential associations between EZH2 and DNA methylation modifications, tumor microenvironment (TME), immune-related genes, tumor mutation burden (TMB), tumor neoantigen burden (TNB), and representative mismatch repair (MMR) genes. We also investigated the molecular and immunological characterizations of EZH2. Finally, we predicted immunotherapeutic responses based on EZH2 expression levels. We found that EZH2 was highly expressed in PCa, was associated with a poor prognosis, and may serve as an independent prognostic factor. EZH2 expression in PCa was associated with DNA methylation modifications, TME, immune-related genes, TMB, TNB, and MMR. By gene set enrichment analysis and gene set variation analysis, we found that multiple functions and pathways related to tumorigenesis, progression, and immune activation were enriched. Finally, we inferred that immunotherapy may be more effective for PCa patients with low EZH2 expression. In conclusion, our study showed that EZH2 could be a potentially efficient predictor of prognosis and immune response in PCa patients.