In particular, why are externalities bad?
This is a non-economics question. Economics cannot say if something can be good or bad. For that you need moral philosophy. For example, if some economic policy would result in death of billions of people, can we, from pure economic perspective, say it is bad? No, we cannot do that because economics has no tools to distinguish between good or bad. We can use moral philosophy to determine if that policy is good or bad but not economics itself.
Intuitively I personally agree externalities are "market failures," but I'm wondering what precise sense can be made of this claim. Why exactly are externalities market failures?
A definition of market failure is a situation when (Hindriks and Myles Intermediate Public Economics 2nd ed pp 42);
... any of the assumptions underlying the competitive economy fail to be met and as a consequence efficiency is not achieved ...
Externalities;
violate the assumption underlaying competitive/perfect market. One of the assumptions of such market is that there are no externalities.
externalities can be shown to allocative inefficiency. That is the goods in market will no longer be allocated to the people who value them most, because in case of externalities price no longer reflects the true costs of a good (e.g. environmental pollution creates cost to society, but in absence of property rights to clean air, price does not reflect this societal cost as opposed to other costs, such as use of labor or natural resources that are reflected in the price).
I had thought that externalities are necessarily inefficient (i.e. Pareto inefficient). But a helpful recent stack exchange discussion disabused me of that notion.
Perhaps externalities are bad simply because, while they are not necessarily inefficient, they are typically inefficient?
Note pareto efficiency is not necessarily exactly the same as allocative efficiency (see this Lumen learning article for further explanation). Hence this is a moot point, something can lead to Pareto inefficient outcomes and not be market failure.
A final thought: Intuitively, when students are taught about negative externalities via the standard example of pollution, my guess is that the most students intuitively think, "Right, it's unfair of that factory to foist pollution costs on others while reaping the benefits of cheaper production for themselves."
No this is not correct. I do not know of any serious mainstream economics textbook that would claim that this is unfair. Economics has no tools to determine whether something is fair or unfair. Not paying for societal and environmental costs for production might be completely fair or unfair depending on various moral arguments. Economics as a subject has no special insights into the morality of such action and it can at best quantify the effects in terms of economic efficiency or lost utility compared to counterfactuals etc.
But I don't think that unfairness is what economists have foremost in mind when they label externalities as "market failures." Right?
Exactly, economists do not care about fairness in their professional capacity. Of course every economist is also a person and has their own moral philosophy, but a professional economist would not label something fair or unfair based on economic analysis/research per se. Economic research could be used as an input into deciding whether something is fair or unfair (e.g. when dealing with some consequentialist ethics you need to also know objective consequences of actions before deciding on their morality/fairness).
In short, is there a consensus view among economists as to precisely why externalities should be deemed a market failure?
Yes, as mentioned above it is because;
- they are violation of standard assumptions of perfect/competitive market.
- they lead to allocative inefficiency.
This is not as much matter of consensus as matter of definition (e.g. 2 is not prime because of consensus per se but because primes are simply defined in a such a way that 2 qualifies as prime). An externality simply satisfies the commonly accepted definition of market failure. If you would change definition of market failure it might stop qualifying, but the definition I used is broadly used in economics profession.