This book focuses on creating an integrated library of learning models and optimization techniques to assist decision-making on issues in the energy and building sector. It provides modern solutions to energy management and efficiency while addressing a scientific gap in the development of advanced algorithmic methods to solve these problems. More specifically, the focus is on the development of models and algorithms for problems falling into three broader categories, namely: (a) Distributed Energy Generation, (b) Microgrid Flexibility, and (c) Building Energy Efficiency. Artificial Intelligence models and mathematical optimization techniques are developed and presented for applications related to each of these categories, through a thorough analysis of the fundamental parameters of each application as well as the interactions among them. Professors, researchers, scientists, engineers, and students in energy sector-related disciplines are expected to be inspired and benefit from this book, along with readers from other disciplines wishing to learn more about this exciting new field of research.