Light has profoundly influenced the evolution of life on earth. As widely appreciated, light enables us to generate images of our environment. However, light - through intrinsically photosensitive retinal ganglion cells (ipRGCs) - also influences behaviours that are essential for our health and quality of life but are independent of image formation. These include the synchronization of the circadian clock to the solar day, tracking of seasonal changes and the regulation of sleep. Irregular light environments lead to problems in circadian rhythms and sleep, which eventually cause mood and learning deficits. Recently, it was found that irregular light can also directly affect mood and learning without producing major disruptions in circadian rhythms and sleep. In this Review, we discuss the indirect and direct influence of light on mood and learning, and provide a model for how light, the circadian clock and sleep interact to influence mood and cognitive functions.