My general metric for whether something should be a function of government (or so heavily regulated by government that the distinction is moot) is "Does this business function best as a monopoly?" By default, I assume everything that does should be a government function, and everything that shouldn't should be regulated to avoid becoming a monopoly.
So by default, I would assume that electricity distribution should be a government function, but electric generation could probably work fine as a set of non-monopolies competing to feed energy into the publicly-run grid at the lowest prices.