Artificial intelligence is often portrayed as an energy villain—power-hungry data centers threatening to overwhelm electrical grids and derail climate goals.