Tissue-resident memory T cells (TRMs) reside in peripheral tissues and provide rapid immune defense against local infection and tumor. Tumor-associated TRMs share common tissue-resident features and formation mechanisms, representing some unique subsets of tumor-infiltrating lymphocytes (TILs). However, differences in the tumor microenvironment (TME) and tumor evolution stage result in TRMs exhibiting temporal and spatial heterogeneity of phenotype and function not only at different stages, before and after treatment, but also between tumors origin from different tissue, primary and metastasis cancer, and tumor and adjacent normal tissue. The infiltration of TRMs is often associated with immunotherapy response and favorable prognosis, however, due to different definition, it has been shown that some subtypes of TRMs can also have a negative impact. Therefore, it is crucial to precisely characterize the TRM subpopulations that can influence the therapeutic efficacy and clinical prognosis of various solid tumors. Here, we review the spatiotemporal heterogeneity of tumor-associated TRMs, as well as the differences of their impact on the clinical outcomes. We also explore the relationship between TRMs and immune checkpoint blockade (ICB) and TIL therapy, providing insights into potential new targets and strategies of immunotherapy.