Immunotherapy is revolutionizing the clinical management of multiple tumors. However, only a fraction of patients with cancer responds to immunotherapy, and currently available immunotherapeutic agents are expensive and generally associated with considerable toxicity, calling for the identification of robust predictive biomarkers. The overall genomic configuration of malignant cells, potentially favoring the emergence of immunogenic tumor neoantigens, as well as specific mutations that compromise the ability of the immune system to recognize or eradicate the disease have been associated with differential sensitivity to immunotherapy in preclinical and clinical settings. Along similar lines, the type, density, localization, and functional orientation of the immune infiltrate have a prominent impact on anticancer immunity, as do features of the tumor microenvironment linked to the vasculature and stroma, and systemic factors including the composition of the gut microbiota. On the basis of these considerations, we outline the hallmarks of successful anticancer immunotherapy.