Acute light exposure exerts various effects on physiology and behaviour. Although the effects of light on brain network activity in humans are well demonstrated, the effects of light on cognitive performance are inconclusive, with the size, as well as direction, of the effect depending on the nature of the task. Similarly, in nocturnal rodents, bright light can either facilitate or disrupt performance depending on the type of task employed. Crucially, it is unclear whether the effects of light on behavioural performance are mediated via the classical image-forming rods and cones or the melanopsin-expressing photosensitive retinal ganglion cells. Here, we investigate the modulatory effects of light on memory performance in mice using the spontaneous object recognition task. Importantly, we examine which photoreceptors are required to mediate the effects of light on memory performance. By using a cross-over design, we show that object recognition memory is disrupted when the test phase is conducted under a bright light (350 lux), regardless of the light level in the sample phase (10 or 350 lux), demonstrating that exposure to a bright light at the time of test, rather than at the time of encoding, impairs performance. Strikingly, the modulatory effect of light on memory performance is completely abolished in both melanopsin-deficient and rodless–coneless mice. Our findings provide direct evidence that melanopsin-driven and rod/cone-driven photoresponses are integrated in order to mediate the effect of light on memory performance.