Let me share my personal story: I used to work with light themes, then switched to dark themes, a switched back a few months ago to light themes.
Why?
Because I changed my desk location in the office, with very different ambient lightning (far or close to the windows, stuff like that). And - as many other have already written - the dark vs light is usually motivated because of contrast issue.
In a low-light environment, your screen is the main light source. Hence you'd prefer a dark theme to avoid making your eyes tired.
In a bright environment, the low-contrast of a dark theme tires your eyes more than a light one, because of its low contrast.
The morale of this story: I learnt that , before trying to customize my dev setup, I should take really more care about my environment, to avoid places that are either too much bright or too much dark (which you can mitigate, with spotlights or curtains), and then, find the setup which better suits my eyes. But to be comfortable, the theme is only a very small part of your global setup!
Oded Arbel