As Waldemar said, it is has a natural reason. During long evolution the eyes are adopted to acquire information through shadows around the objects, but it works also in reverted mode (light object on a dark background). However it is understood that the eye cannot work in two modes at the same time (normal and reverted), so black text on light background is just the more natural way, since we are "day" animals and most of the time we need dark objects/contours and light backgrond to acqure information effectively.
Interestingly there are anecdotes told, that a dark theme reduces the eye strain. This is a typical fallacy: a user sets a dark theme and sees much less light - at a first glance it reduces the strain, but if you need to read the text and not only stare at the screen, it turns out that it is just very unnatural way. No matter how does one play with colors, black text on light background will always win. And in a low lighted room, one just need to tune the background color, but it never should go in the reverted mode, if you really care about your eyes.
Also I have read some experimental reports that people with certain impairments are known to find it easier to read with reverted contrast. I personally could believe in this, but again, I am very very skeptical about that.
I just think that in most cases those experiments just lack the appropriate setup and proper question formulation. I doubt that using dark theme can be any good solution for patients with such impairments. I suppose there can be some very rare case, if a patient has some kind of "reverted" vision, which means he can see better in reverted contrast, which in turn IMHO is very uncommon, at least I have never ever heard about it. In such a case I would say, it is a very severe impairment, and can only evoke pity.
In other words I suppose that the percent of people, who really can read better with reverted contrast is very small, I would speculate the percentage must be a number with many zeroes after the dot.
So if someone claims that light text on dark ground is better readable, almost sure he is talking rubbish and is damaging his own eyes without even understanding it.
FOLLOWUP
Regarding the question, if B on W is really better than W on B, one can find enough clarifications, similar to the given above.
One article with a self-explaining title:
"Positive display polarity is advantageous for both younger and older adults"
http://www.tandfonline.com/doi/abs/10.1080/00140139.2013.790485
Conclusion of the study:
"... The presentation in positive polarity is recommended for all ages. ..."
This is just something that one need to accept and stop searching for something that is not there.
I'll just put here a list of related misbeliefs:
- B on W is better because historically people used black ink on a light medium and got used to it.
While the latter is true, it is still not the reason, and the reason lies much deeper in our nature.
- Dark background causes less eye strain.
Ok, but where is the information we read then? One reads through patterns (words) and not some abstract blobs, one needs sharp details for effective decoding.
- In a dark environment use a dark theme.
Just forget about the dark environment, buy a lamp and set up a comfort lighting.
I was experimenting a lot and reading on the subject of optimal text/ground color, but I've never doubted that inverted contrast is a bad idea for text, regardless of the media and lighting.
For me much more interesting is, which ground color is actually optimal on a monitor? I mean optimal for reading text in normal conditions - in a room with normal lighting (not too dark, but no bright sun).
After comparing my experience with opinions found in the web and from some of my coworkers, which I use sometimes as experimental persons :)
it turns out that this optimum is indeed quite narrow.
So this is my personal choice for the background color, and it is similar to other's personal preferences:

Note the value of the color, #E6E8DC and especially the Hue value: 73 degrees. (This color picker is in Photoshop, other programs can use other HSB ranges and units.)
So my statement is, if you start with this color, you'll be not far from the optimum, which of couse can vary in some range.
How could it be theoretically supported? I don't know actually, but here is an interesting, let's say, coincidence: Let's consider the book "Sensation and Perception" by E. Bruce Goldstein, Page 56
(https://books.google.de/books/about/Sensation_and_Perception.html?id=2tW91BWeNq4C&redir_esc=y)

Here one sees the visual stimuli peak depending on light wavelength. Interestingly this peak lies exactly on the same Hue range,
which I found most comfortable for reading (compare with previous image). And the farther from this Hue value, the worse was my reading experince.
Does this explain something on a low-level? Well it should provide more contrast in terms of stimuli. But why this particular Hue value, I don't know, but it is still very interesting. Probably it has also something to do with evolution: mixing the color of sand, green vegetation, brown leaves could give something similar to this color Hue. Anyway, this color optimum is something that I can setup for me easily on a computer.
Now going back to the original question:
- Why dark on light is easier? Namely, how does it come so?
This is an interesting question, and I think in general it can be explained as the natural evolution. Just think of millions of years of evolution and these things:
- A crab on the sand
- A bug on a leaf
- A structure of a tree or cracks on a stone
To make a parallel with reading it is better to think of the last example - a crack on a stone. This is statical information about an object, its form, exactly what we need to decode a text piece.
There are also counter examples - e.g. light hay on the dark ground, but such things simply are less common in our world. So here lies the answer -
we treat the objects by dark contours and shadows simply because these
represent dominant forms, or patterns in the nature. To be more exact, those patterns which are important for our life and activity.
If a creature evolves in other environment, like deep sea or a cave, then it can come to other principles of course.
A good example is this test from the same book "Sensation and Perception", page 109. This test is used for slightly other purposes, but it shows the general principle:
Answering the question, one can notice that one tends to identify the dark areas as objects, not the light ones, despite they are formed by the same curves.