Batteries are taking an increasing place in power grids to integrate renewables, secure supply and support new uses such as data centers.