Patents are increasingly taken to be one of the most important measurable signatures of technological innovation. We assemble a dataset covering patents worldwide, across the spectrum of energy sectors and analyze the temporal, sectoral and geographic trends in energy technologies, and early signs of a transition away from fossil fuels and into renewables. Specifically, we track the time evolution of different energy technologies by identifying and analyzing time series for energy patents issued worldwide since the late 1960s. We analyze the evolution of many different energy sectors from fossil fuels (coal, oil and natural gas), and other technologies such as nuclear fusion and fission, hydroelectric, to developing fields, including wind, solar and fuel cells. We establish measures of productivity in the development of these technologies by analyzing the correlation between the return in terms of numbers of patents to funding data. We also correlate funding and technological development to price of energy generation and produce scenarios that specify the size and timing of investment necessary to make several renewable energy technologies competitive economically. Finally, we create networks of co-invention that reveal features of information sharing within and across energy sectors and study their temporal evolution.