Markets exist to help determine the best price and quantity for goods and services. Unfortunately, markets often miss the perfect price and quantity because of externalities, when this gets bad enough this leads to a market failure. The IPCC describes market failure as any situation where there's a difference between what prices are and what they should be. Specifically, environmental harm that comes from climate change is not taken into account in the cost of producing energy.
People and companies decide without thinking about the negative effects the decisions might have on others or society at large. Market failure can be and is a result of deadweight loss in a market which is an inefficient market. As the IPCC describes it, a misallocation of goods such as a shortage or extreme surplus throws a market out of equilibrium.
When a market does not have a pareto efficient equilibrium; the market is said to be failing. This is due to a number of possibilities, but often because the of externalities which create a deadweight loss. These externalities occur because the decisions lead to some hard. Economists express this as a net external social cost. This situation means that the transactions can be bad for people. Usually, economists believe that markets will create transactions that benefit society in a positive way, but when market failure happens when the unaccounted for costs create problems for people.
These social costs are usually a negative effect on society (or a significant portion of society) such as pollution. Of course, firms and consumers generally don't think about the social cost when making decisions. One example would be when a person decides between a gasoline powered vehicle and a hybrid car. When a buyer is only concerned with the cost to themselves, the choice is clear. The gasoline vehicle is cheaper. The consumer isn't worrying about the pollution that it causes. When the buyer purchases a hybrid vehicle it could mean that the buyer thinking of the social cost because it emits less pollution than the gasoline vehicle. (It should be noted that the hybrid vehicle may save the buyer money in the long run, depending on how much the buyer drives, gas prices, etc.)
Figure 1 illustrates what these decisions look like in the market:
This same example can be applied to an electricity generation firm which is deciding between building a coal-fired power plant and a nuclear power plant. The coal plant is cheaper but produces a higher level of pollution and more harmful pollution (mercury, particulate matter and others) whereas the nuclear plant is more expensive but produces less harmful emissions. If the firm and many others continue to choose to build a majority of new plants as coal plants than the private cost is covered but the social cost increases because of the increasing level of harmful emissions produced. The choice to build nuclear plants reduces the social cost as they produce fewer emissions so the social cost is lower. Making the choice to build more efficient, low emission electrical production systems reduces the magnitude or size of an externality and lowers the chance of a market failure.
To remedy a failing market, governments attempt to prevent the market from producing inefficient outcomes by affecting the price or quantity creating the externality, thus minimizing the negative effects. Because firms and consumers do not always take into account the social cost, government policies can be used to incentivize or in some cases force firms and consumers to make decisions that account for the social cost, most often this takes the form of regulations. This can "protect" the market from failure and help ensure an efficient allocation of goods and services in a market.