A merit good is one where the marginal social benefit is greater than the marginal private benefit of consumption. Merit goods lead to market failure because the wrong quantity of goods is sold at the wrong price. The diagram below explains more.
Consumption of a merit good leads to a positive externality. Remember that social benefit maximisation is when MSB = MSC and private benefit maximisation is when MPB = MPC. Therefore if the free market were to provide merit goods, it would provide at Q1 to maximise private benefit. However, the socially optimum level of consumption is at Q2 thus leading to under-consumption and under production of merit goods (hence market failure).
Marginal External Benefit is MSB – MPB. It is the extra benefit incurred from producing the positive externality.