A considerable part of recent research in smart cities and IoT has focused on achieving energy savings in buildings and supporting aspects related to sustainability. In this context, the educational community is one of the most important ones to consider, since school buildings constitute a large part of non-residential buildings, while also educating students on sustainability matters is an investment for the future. In this work, we discuss a methodology for achieving energy savings in schools based on the utilization of data produced by an IoT infrastructure installed inside school buildings and related educational scenarios. We present the steps comprising this methodology in detail, along with a set of tangible results achieved within the GAIA project. We also showcase how an IoT infrastructure can support activities in an educational setting and produce concrete outcomes, with typical levels of 20% energy savings.