AI is widely used to improve energy system efficiency, but its own growing energy consumption and environmental footprint are raising concerns. The sustainability of AI in the energy sector must be addressed as an integral part of its governance. Current frameworks for AI in energy focus on optimising the energy system itself, ignoring the direct and embodied environmental impacts of the AI systems deployed. A holistic sustainability framework is lacking. This article develops a framework for sustainable AI in energy systems, built around three pillars: computational efficiency, carbon-aware algorithms, and life-cycle responsibility. The framework is constructed through conceptual synthesis of green AI research, carbon-aware computing, life-cycle assessment, and energy policy. No empirical analyses are performed. The framework specifies strategies for minimising AI's energy use, aligning its computation with low-carbon energy availability, and managing the full life-cycle environmental impact of AI hardware and software. Two tables summarise the pillars and their interactions. Integrating sustainability into the core design of AI for energy systems can ensure that AI contributes positively to the energy transition, avoiding a rebound effect where AI's own footprint undermines its benefits.