Energy market prices ignore external effects, hence miss-allocate energy generation between (polluting) fossil fuels and (clean) solar technologies. Correcting the failure requires understanding the market allocation forces at hand. An important feature of solar energy is that its cost of supply is predominantly due to upfront investments in capital infrastructure (rather than to the actual supply rate) and this feature has far reaching implications for the market allocation outcome. Studying the market allocation process, we specify the conditions under which solar technologies penetrate the energy sector. The framework is then used to analyze policy regulation in the form of taxing fossil energy and subsidizing investments in solar energy. The first policy measure addresses undesirable environmental effects associated with the use of fossil fuels and the second internalizes the benefits of learning by doing in the solar industry. Under certain conditions, a temporary subsidy on solar energy investments gives rise to a flourishing, self-sustained solar industry that will (eventually) drive fossil energy out of production.