market failure means that the equilibrium price and quantity of a g/s is either higher or lower than the social optimum (ie the equilibrium when external costs are taken into account)
When there are negative externalities, firms should be supplying less because the externaility is imposing a cost on their production. However, they have no incentive to do this due to the free rider problem, and thus their supply only takes into account their private costs. Thus, supply is more than it should be, and equilibrium price is lower and quantity supplied is higher than social optimum. This excess supply over the social optimum will cause increased depletion of the ozone. (eg factories should be only supplying 60 units to minimise pollution, but instead because they do not take cost of pollution into account, they produce 80 units, which have pollution that depletes ozone)
it is the same for positive externalities, where consumers demand less of the g/s than the social optimum because they only take into account what the external benefit for themselves is. Thus demand is lower than should be, and equilibirum price is higher and quantity is lower than social optimum. Thus, things that are beneficial to all of society is undervalued and under supplied. (Eg more people should be demanding more education as it is beneficial to all of society if people all learn about the depletion of the ozone, but because people don't take into account the extra benefit society gains from education and only think about how much benefit they get themselves, they demand less of it. therefore, less education provided on ozone therefore effective ways to decrease depletion of ozone is lowered)