Higher energy prices might vex the economy, but they provide a financial boost for some states, helping to close budget deficits and fix roads.