Daily changes in light and food availability are major time cues that influence circadian timing1. However, little is known about the circuits that integrate these time cues to drive a coherent circadian output1-3. Here we investigate whether retinal inputs modulate entrainment to nonphotic cues such as time-restricted feeding. Photic information is relayed to the suprachiasmatic nucleus (SCN)-the central circadian pacemaker-and the intergeniculate leaflet (IGL) through intrinsically photosensitive retinal ganglion cells (ipRGCs)4. We show that adult mice that lack ipRGCs from the early postnatal stages have impaired entrainment to time-restricted feeding, whereas ablation of ipRGCs at later stages had no effect. Innervation of ipRGCs at early postnatal stages influences IGL neurons that express neuropeptide Y (NPY) (hereafter, IGLNPY neurons), guiding the assembly of a functional IGLNPY-SCN circuit. Moreover, silencing IGLNPY neurons in adult mice mimicked the deficits that were induced by ablation of ipRGCs in the early postnatal stages, and acute inhibition of IGLNPY terminals in the SCN decreased food-anticipatory activity. Thus, innervation of ipRGCs in the early postnatal period tunes the IGLNPY-SCN circuit to allow entrainment to time-restricted feeding.