In the US wholesale energy prices are locational and determined by three things: the cost of energy, congestion in the transmission network, and losses in delivery. Retail rates are also locational but principally determined by state-level organizations (Public Utility Commissions) who regulate the natural monopolies who control the distribution network in the state so they are unable to charge monopoly rents. Rate setting in most places is a very political process.