When I buy energy produced by coal, and the coal emissions contribute to children contracting asthma, my transaction is creating external costs that I don't pay. These negative externalities are unjust and inefficient. Pigouvian taxes such as a carbon tax work to price in the cost of these negative externalities, thereby changing behavior to reduce that form of injustice.
https://en.m.wikipedia.org/wiki/Pigovian_tax