Yet, despite the risks, AI’s rapacious appetite for electricity could actually help spur crucial investment in clean energy.