Allocative efficiency occurs when resources are distributed in 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, meaning that resources are allocated to produce exactly what society desires. This concept is crucial in understanding how market forces work to balance supply and demand while considering opportunity costs.