BackgroundA prognostic model of bladder cancer was constructed based on costimulatory molecules, and its stability and accuracy were verified in different datasets.MethodThe expression profile of bladder cancer RNA and the corresponding clinical data in The Cancer Genome Atlas (TCGA) database were analyzed employing computational biology, and a prognostic model was constructed for costimulating molecule‐related genes. The model was applied in GSE160693, GSE176307, Xiangya_Cohort, GSE13507, GSE19423, GSE31684, GSE32894, GSE48075, GSE69795 and GSE70691 in TCGA dataset and Gene Expression Omnibus database. The role of costimulating molecules in bladder cancer tumor subtypes was also explored. By consistent cluster analysis, bladder cancer in the TCGA dataset was categorized into two subtypes: C1 and C2. The C1 subtype exhibited a poor prognosis, high levels of immune cell infiltration and significant enrichment of natural killer cells, T cells and dendritic cells in the C1 subtype. In addition, the ImmuneScore calculated by the ESTIMATE algorithm differed greatly between the two subtypes, and the ImmuneScore of the C1 subtype was greater than the C2 subtype in a significant manner.ResultsThis study also assessed the relationship between costimulating molecules and immunotherapy response. The high‐risk group responded poorly to immunotherapy, with significant differences in the amount of most immune cells between the two groups. Further, three indices of the ESTIMATE algorithm and 22 immune cells of the CIBERSORT algorithm were significantly correlated with risk values. These findings suggest the potential value of costimulating molecules in predicting immunotherapy response.ConclusionA costimulatory molecule‐based prognostic model for bladder cancer was established and validated across multiple datasets. This model introduces a novel mode for tailoring treatments to each individual with bladder cancer, and offers valuable insights for informed clinical choices. Simultaneously, this research also delved into the significance of costimulating molecules within distinct bladder cancer subtypes, shedding novel insights into improving immunotherapy strategies for the treatment of bladder cancer.