Coal mines are losing the battle against renewable energy because of the plummeting prices of solar panels and wind turbines.