Cancer immunogenomics is an emerging field that bridges genomics and immunology. The establishment of large-scale genomic collaborative efforts along with the development of new single-cell transcriptomic techniques and multi-omics approaches have enabled characterization of the mutational and transcriptional profiles of many cancer types and helped to identify clinically actionable alterations as well as predictive and prognostic biomarkers. Researchers have developed computational approaches and machine learning algorithms to accurately obtain clinically useful information from genomic and transcriptomic sequencing data from bulk tissue or single cells and explore tumours and their microenvironment. The rapid growth in sequencing and computational approaches has resulted in the unmet need to understand their true potential and limitations in enabling improvements in the management of patients with cancer who are receiving immunotherapies. In this Review, we describe the computational approaches currently available to analyse bulk tissue and single-cell sequencing data from cancer, stromal and immune cells, as well as how best to select the most appropriate tool to address various clinical questions and, ultimately, improve patient outcomes.