The tumor microenvironment (TME) is a complex mixture of cell-types that interact with each other to affect tumor growth and clinical outcomes. To accelerate the discovery of such interactions, we developed CODEFACS (COnfident DEconvolution For All Cell Subsets), a deconvolution tool inferring cell-type-specific gene expression in each sample from bulk expression measurements, and LIRICS (LIgand Receptor Interactions between Cell Subsets), a supporting pipeline that analyzes the deconvolved gene expression from CODEFACS to identify clinically relevant ligand-receptor interactions between cell-types. Using 15 benchmark test datasets, we first demonstrate that CODEFACS substantially improves the ability to reconstruct cell-type-specific transcriptomes from individual bulk samples, compared to the state-of-the-art method, CIBERSORTx. Second, analyzing the TCGA, we uncover cell-cell interactions that specifically occur in TME of mismatch-repair-deficient tumors and are associated with their high response rates to anti-PD1 treatment. These results point to specific T-cell co-stimulating interactions that enhance immunotherapy responses in tumors independently of their mutation burden levels. Finally, using machine learning, we identify a subset of cell-cell interactions that predict patient response to anti-PD1 therapy in melanoma better than recently published bulk transcriptomics-based signatures. CODEFACS offers a way to study bulk cancer and normal transcriptomes at a cell type-specific resolution, complementing single-cell transcriptomics.