The answer depends on who has the lowest cost of obtaining information on costs and benefits of an activity. When private persons are the best observers of the social costs and the social benefits of an activity because they could easily be either victims or injurers in such an occurrence, a community standard usually exists. This standard could be used as a socially optimal norm with sanctions for deviations. An advantage of an obligation backed a sanction is that individuals are relieved from each trying to balance the costs of compliance against the benefits of non-compliance. When officials are the best observers of the social costs and private persons the best observers of the social benefits of an activity, it is more efficient to price the activity.
Individuals are then free to balance their own costs and benefits.
Pricing is particularly efficient when compliance costs and non-compliance benefits differ substantially among actors. Some individuals may be tempted to treat sanctions as prices and choose their level of compliance by discounting the penalty with the chance of being caught. Hence the concern over the appropriate severity of the penalty in the absence of perfect enforcement. But since most people will obey a reasonable legal standard backed by a reasonable sanction, the level of penalty is perhaps less important than choosing the correct standard. This law-abiding tendency is reinforced by the sudden jump in an individual's costs when he enters the forbidden zone where behavior is sanctioned.