Background. Possible physiological causes for the effect of sunlight on mood are through the suprachiasmatic nuclei and evidenced by serotonin and melatonin regulation and its associations with depression. Cognitive function involved in these same pathways may potentially be affected by sunlight exposure. We evaluated whether the amount of sunlight exposure (i.e. insolation) affects cognitive function and examined the effect of season on this relationship. Methods. We obtained insolation data for residential regions of 16,800 participants from a national cohort study of blacks and whites, aged 45+. Cognitive impairment was assessed using a validated six-item screener questionnaire and depression status was assessed using the Center for Epidemiologic Studies Depression Scale. Logistic regression was used to find whether same-day or two-week average sunlight exposure was related to cognitive function and whether this relationship differed by depression status. Results. Among depressed participants, a dose-response relationship was found between sunlight exposure and cognitive function, with lower levels of sunlight associated with impaired cognitive status (odds ratio = 2.58; 95% CI 1.43-6.69). While both season and sunlight were correlated with cognitive function, a significant relation remained between each of them and cognitive impairment after controlling for their joint effects. Conclusion. The study found an association between decreased exposure to sunlight and increased probability of cognitive impairment using a novel data source. We are the first to examine the effects of two-week exposure to sunlight on cognition, as well as the first to look at sunlight's effects on cognition in a large cohort study. © 2009 Kent et al; licensee BioMed Central Ltd.