Allocative efficiency occurs when resources are distributed in a way that maximizes the net benefit to society, where the price of goods equals the marginal cost of production. This ensures that the goods produced are those most desired by consumers, reflecting their preferences and willingness to pay.