Molecular mechanisms underlying brain structure and function are affected by nutrition throughout the life cycle, with profound implications for health and disease. Responses to nutrition are in turn influenced by individual differences in multiple target genes. Recent advances in genomics and epigenomics are increasing understanding of mechanisms by which nutrition and genes interact. This review starts with a short account of current knowledge on nutrition–gene interactions, focusing on the significance of epigenetics to nutritional regulation of gene expression, and the roles of SNP and copy number variants (CNV) in determining individual responses to nutrition. A critical assessment is then provided of recent advances in nutrition–gene interactions, and especially energy status, in three related areas: (i) mental health and well-being, (ii) mental disorders and schizophrenia, (iii) neurological (neurodevelopmental and neurodegenerative) disorders and Alzheimer's disease. Optimal energy status, including physical activity, has a positive role in mental health. By contrast, sub-optimal energy status, including undernutrition and overnutrition, is implicated in many disorders of mental health and neurology. These actions are mediated by changes in energy metabolism and multiple signalling molecules, e.g. brain-derived neurotrophic factor (BDNF). They often involve epigenetic mechanisms, including DNA methylation and histone modifications. Recent advances show that many brain disorders result from a sophisticated network of interactions between numerous environmental and genetic factors. Personal, social and economic costs of sub-optimal brain health are immense. Future advances in understanding the complex interactions between nutrition, genes and the brain should help to reduce these costs and enhance quality of life.