Tumor cell senescence plays a crucial role in tumor immunity. We investigated whether the senescent cell signature (SCS) could predict prognosis in non-small cell carcinoma (NSCLC) and melanoma datasets treated with PD-L1/PD-1 inhibitors. Patients with high SCS expression exhibited elevated levels of interferon-gamma and T cell-inflamed signatures in three lung adenocarcinomas (LUAD), two squamous cell carcinoma (LUSC) and three melanoma datasets. The high SCS group was associated with PD-L1-related pathways such as IL6/JAK/STAT3 and TNF-alpha signaling via NF-kB in LUAD, LUSC, and melanoma datasets. A positive correlation was observed between several immune checkpoint markers and the SCS, indicating an immunosuppressive state in LUAD, LUSC and melanoma datasets. In patients treated with PD-1/PD-L1 inhibitors, a higher SCS was associated with a better prognosis, and a positive correlation between SCS and PD-L1 was observed in six independent NSCLC and three independent melanoma datasets. We used the LASSO Cox regression model to build a risk model focusing on the SCS genes that particularly predict prognosis. We confirmed that the model accurately predicts prognosis. However, the senescent immunohistochemical markers p16 and p21 could predict the response to PD-1/PD-L1 inhibitors in patients with LUSC and melanoma but not in patients with LUAD. SCS could serve as a valuable biomarker to complement PD-L1 expression in patients receiving PD-L1/PD-1 inhibitors.