Technological progress has made clean energy a profitable investment, and growing popular pressure has forced politicians to respond to the threat of ecological disaster.