The transformation of the energy system to a renewable one is crucial to enable sustainable development for mankind. The integration of high shares of renewable energy sources (RES) in the energy matrix is, however, a major challenge due to the low energy density per area unit and the stochastic temporal patterns in which RES are available. Distributed generation for energy supply becomes necessary to overcome this challenge, but it sets new pressures on the use of space. To optimize the use of space, spatial planning and energy planning have to be integrated, and suitable tools to support this integrated planning process are fundamental. Spatiotemporal modelling of RES is an emerging research field that aims at supporting and improving the planning process of energy systems with high shares of RES. This paper contributes to this field by reviewing latest developments and proposing models and tools for planning distributed energy systems for municipalities. The models provide estimations of the potentials of fluctuating RES technologies and energy demand in high spatiotemporal resolutions, and the planning tools serve to configure energy systems of multiple technologies that are customized for the local energy demand. Case studies that test the spatiotemporal models and their transferability were evaluated to determine the advantages of using these instead of merely spatial models for planning municipality-wide RES-based energy systems. Spatiotemporal models allow a more detailed estimation of RES potentials and serve to find not only optimal locations but also optimal sizes for individual RES plants. While the potential of variable RES based on yearly energy generation values can be considerably larger than the energy demand, only a fraction of it can be deployed without compromising the quality and reliability of the local energy supply system. Furthermore, when spatiotemporal models are used, it can be seen that technological diversity is beneficial for the supply quality. Similarly, the advantages and limits of the deployment of storage systems and of combinations of RES-based technologies to cover the local demand were determined and evaluated. Finally, the results from the analyses provide sufficient information to define road maps of installations deployment to achieve desired RES penetration objectives.