The daily solar cycle allows organisms to synchronize their circadian rhythms and sleep-wake cycles to the correct temporal niche. Changes in day-length, shift-work, and transmeridian travel lead to mood alterations and cognitive function deficits. Sleep deprivation and circadian disruption underlie mood and cognitive disorders associated with irregular light schedules. 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.