The market is going to do whatever is cheapest. It is now cheaper to get natural gas out of the ground because of fracking, and the reserves available are so massive that it makes sense to invest in natural gas powerplants as they will be supplied with cheap fuel for a very long time. It is also cheap to burn natural gas because it doesn't require scrubbing and other processing of the emissions to reduce pollution.
The price of solar has continued to drop - panels have been way under a dollar a watt for a while now ($0.79 a watt buying 6,000W of panels at a time, and I'm sure power companies get even better deals buying bigger quantities). The way these are now being utilized (just fed into the grid when they can produce power without battery storage, inverters, etc) is very economical for power companies to invest in.
Coal, on the other hand, is relatively expensive and labor-intensive to get out of the ground, even when strip mining. Further, it takes expensive scrubbers to remove pollutants from the exhaust when it is burnt, which further increases the cost to use coal. Both of those factors combined (fracking and solar prices dropping) simply make other sources of energy cheaper to produce and utilize than coal for generating electricity.
If you were to ask the question "Why didn't we start doing this 20 years ago?" the answer is because we didn't have the technology to mass produce solar this inexpensively, and we didn't have the technology to produce natural gas this inexpensively.