Investors have turned more positive on green stocks as the energy needed to power AI can’t be delivered without renewables