The following quote is from Greg Bahnsen's book, Theonomy in Christian Ethics.

The main underlying principle of scriptural penology (whether civic or eternal) is not reformation or deterrence, but justice. The outstanding characteristic of theonomic punishment is the principle of equity; no crime receives a penalty which it does not warrant. The punishment for a violation of God’s law is always appropriate for the nature of the offense; “an eye for an eye, and a tooth for a tooth.” Here is the most blessed standard of social retribution that man’s civilization has ever seen. That the Older Testament law sets forth humane and just punishments for crime is immediately apparent when one compares it with the legal codes of the nations around Israel. God’s penal sanctions are not overweighted, cruel, unusual, or excessive; a criminal receives what he deserves: no more, no less. It is especially important for Christians to recognize this fact, for it is the underlying principle at work in the atoning death of Jesus Christ upon the cross; He is the sinner’s substitute in order to effect atonement. Sin must meet divine judgment (e.g., Nah. 1:2, Hab. 1:13), and God can only forgive sin in a manner consistent with His holiness (Ps. 85:9 f.). Hence a sacrifice had to be offered to placate divine wrath occasioned by sin.

Within this framework Christ came as our sacrificial substitute; He is the Lamb of God who brings redemption by His sacrifice upon the cross (John 1:29; 1 Cor. 5:7; Heb. 9:11-15; 10:3-18; 13:10-12; 1 Pet. 1:18 f.) and thus substitutes Himself for the sinner by taking God’s wrath upon Himself (Col. 2:14; 2 Cor. 5:21; Gal. 3:10, 13; cf. Deut. 21:23; 27: 26; Jer. 11:3). The Lord has caused the iniquity of us all to fall upon Him (Isa. 53:6). Christ laid down His life to atone for the sinner’s life; Christ took the punishment warranted by the sinner’s violation of God’s law upon Himself. Therefore, the sinner need not fear God’s eternal punishment, for his sin has been atoned. The principle of retribution is prominent in man’s salvation. This illustrates the importance of the scriptural penal system: “an eye for an eye, a tooth for a tooth.”

This principle of equity applies to civic punishments imposed by the civil magistrate; there must be equity in punishment, even at the social level. God operates on the basis of retribution (Job 34:11; Ps. 18:25 f.; Ezek. 18:4, 20; Gal. 6:7—and even restitution, Job 42:10), and the penalties which He prescribes for social sins are based on the same principle of retribution, restitution and compensation (Ex. 21:18-22:7; Lev. 6:4 f.; 24:17-21; Deut. 19:21). None of God’s penalties are excessive or lenient; hence the Older Testament does not detail arbitrary punishments for crimes (as with the varying fines for traffic violations from state to state in our modern day), but the punishment was made to correspond to the social heinousness of the offense so that the culprit receives what his public disobedience merits (e.g., Deut. 19:19). The penalties imposed upon social crime are just as appropriate, equitable, and just with respect to their sphere of reference (civil society) as the eternal punishment for that crime (considered now as sin) is just with respect to its sphere of reference (the God-man relation with respect to eternity).