Mice subjected to an aberrant daily light cycle that still maintain the circadian timing system are shown to exhibit increased depression-like behaviours and disruptions in synaptic plasticity and cognitive function. Disruption of the body's circadian clock by exposure to irregular light cycles can affect sleep–wake patterns and cause sleep deprivation, both of which are often associated with mood alterations and cognitive disruptions. This study in mice shows that irregular light schedules can directly affect mood and cognitive function, independent of sleep and circadian rhythms. The aberrant light effects are dependent on melanopsin-containing retinal ganglion cells, and administration of antidepressant drugs restores learning ability, suggesting that the depressive effect precedes learning impairment. The daily solar cycle allows organisms to synchronize their circadian rhythms and sleep–wake cycles to the correct temporal niche1. Changes in day-length, shift-work, and transmeridian travel lead to mood alterations and cognitive function deficits2. Sleep deprivation and circadian disruption underlie mood and cognitive disorders associated with irregular light schedules2. Whether irregular light schedules directly affect mood and cognitive functions in the context of normal sleep and circadian rhythms remains unclear. Here we show, using an aberrant light cycle that neither changes the amount and architecture of sleep nor causes changes in the circadian timing system, that light directly regulates mood-related behaviours and cognitive functions in mice. Animals exposed to the aberrant light cycle maintain daily corticosterone rhythms, but the overall levels of corticosterone are increased. Despite normal circadian and sleep structures, these animals show increased depression-like behaviours and impaired hippocampal long-term potentiation and learning. Administration of the antidepressant drugs fluoxetine or desipramine restores learning in mice exposed to the aberrant light cycle, suggesting that the mood deficit precedes the learning impairments. To determine the retinal circuits underlying this impairment of mood and learning, we examined the behavioural consequences of this light cycle in animals that lack intrinsically photosensitive retinal ganglion cells. In these animals, the aberrant light cycle does not impair mood and learning, despite the presence of the conventional retinal ganglion cells and the ability of these animals to detect light for image formation. These findings demonstrate the ability of light to influence cognitive and mood functions directly through intrinsically photosensitive retinal ganglion cells.