This book chapter advances SDG 7 by surveying literature concerning the use of distributed energy resources in the context of local energy systems, including the deployment of local solutions to generate, store, and manage energy at small scale and micro-scale; grid-related aspects and solutions for optimal grid operation; and finally emergent aspects referring to local energy systems, markets and energy communities, which are gaining relevance in the present and future context of energy transition.