Allocative efficiency occurs when resources are distributed in such a way that maximizes the total benefit received by all members of society. It is achieved when the price of a good or service reflects the marginal cost of producing it, ensuring that consumer preferences align with producer costs.