Background: Breast cancer is one of the most frequently diagnosed cancers among women worldwide. Alterations in the tumor microenvironment (TME) have been increasingly recognized as key in the development and progression of breast cancer in recent years. To deeply comprehend the gene expression profiling of the TME and identify immunological targets, as well as determine the relationship between gene expression and different prognoses is highly critical. Results: The stromal/immune scores of breast cancer patients from The Cancer Genome Atlas were employed to comprehensively evaluate the TME. Although the TME did not correlate with the stages of breast cancer, it was closely associated with the subtypes of breast cancer and gene mutations (CDH1, TP53 and PTEN), and had immunological characteristics. Based on Gene Ontology (GO) functional enrichment analysis, the upregulated genes from the high vs low immune score groups were mainly involved in T cell activation, the external side of the plasma membrane, and receptor ligand activity. We further analyzed and screened the overlapping genes of the top 3 GO terms and upregulated differentially expressed genes (DEGs). Overall survival, time-dependent receiver operating characteristic (ROC), and protein-protein interaction (PPI) network analyses revealed that the genes of the top GO terms of the upregulated DEGs from the high vs low immune score groups exhibited better prognosis in breast cancer; 15 of them were related to good prognosis in breast cancer, especially CD226 and KLRC4-KLRK1.Conclusions: High CD226 and KLRC4-KLRK1 expression levels were identified and validated to correlate with better overall survival in specific stages or subtypes of breast cancer. CD226, KLRC4-KLRK1 and other new targets seem to be promising avenues for promoting antitumor targeted immunotherapy in breast cancer.