This textbook explores the science and tecnologies needed for renewable energy. It examines the properties of the earth's atmosphere for transmitting light in from the sun and mediating outflow of infrared energy from the ground, a role that has an effect on the temperature of the earth. It begins by explaining how the sun works, that is by nuclear fusion, and the basic concepts of quantum tunnelling needed are later expanded to allow a competent treatment of semiconductor physics, the discipline behind solar cells. The book covers wind turbine technology, hydroelectric power and pumped-hydro energy storage. It also talks about the history of the Earth's climate and discusses the effects that the present fossil fuel burning, leading to large emission of greenhouse gas, may have on the future temperature of the earth. The sustainable energy discussed in this book will be available in the long term, past the remaining availability of carbon energy, and is also energy that will not tip the climate into warmer conditions. In connection to this, the action of the atmosphere is analyzed both for its transmission of sunlight to the surface for use in solar power, and in secondary forms such as wind, waves and hydroelectricity. Greenhouse gas impurities, such as carbon dioxide, are also examined for their effects on the atmosphere. Building on this analysis, prospects for sustainable energy and moderate climate are assessed.