There has actually been quite a bit of research into this area:
The results are limited, however as the problem is massively underconstrained, in that there are far more unknowns than there is data. This means exact solutions are impossible, and any answer you get is subject to ambiguity.
Another problem for what you're suggesting is that the research in this area is directed towards machine understanding of visual images. Being able to estimate illumination would be important for robots navigate a maze visually as they'd be able to judge the angle of walls etc. These applications will have different demands on the software than the artistic goal to recreate the lighting in a good portrait for example.
On the subject of the difference between research and commercial software, the research of today forms the basis of the software of tomorrow (one of the reasons I trawl through the proceedings of SIGGRAPH every year). Automatic panorama stitching was a research project once and is now taken for granted. I remember reading about content aware resizing when it was published in a computer vision conference (back then it was called "seam carving") and it was only a couple of years before it became a standard feature in Photoshop.
There is a difference, however between something content aware fill and what you're proposing, and this is that content aware fill can save hours of retouching and thus there is a large demand from it. Estimating the illuminations conditions of a photograph is a very quick process for someone adept at lighting.
One final glimmer of hope lies in the area of video post production. Estimating/modelling the original lighting conditions is important for realistically compositing computer generated animation into real footage (lighting inconistencies are far more likely to be noticed in moving imagery than in a still photo). That plus the extra amount of data available in a video stream, and I'd imaging you'd see the feature you're after appearing first in video editing software.