People that have even just a little bit of light while they sleep at night had a 65% increased chance of developing depression after two years.

abcnews.go.com

This is an observational study which means this is only a correlation. The study did account for weight, smoking or drinking habits, income level and medication use, histories of high blood pressure, diabetes, physical activity, and sleep/wake patterns.

Additionally, people with light at night also tended to go to sleep earlier, wake up later and spend more time in bed overall than counterparts who slept in darker rooms.