Once overlooked, utility regulator elections drew millions in outside spending and increased attention from consumer and environmental groups nationwide, leading to some Democratic victories in red states.