The Buddha did not involve much in issues of worlds normal sociaty and ways and never suggested any either laws nor ways of punishment or even ways of reconciliation for lay people.
The only touch points with the lay people are:
reconciliation (paṭisaraṇīya-kamma) and
"overturning the bowl" (patta-nikkujja-kamma) (BMCII - Relations with the laity)
He teaches "from that, this comes, with arising of that, this arises" and leaves the rest to the individual to concern and take his choice, generally.
How ever, in regard of his community of Monks (Nuns) he created the Vinaya (Discipline) as a measure for behaviour incl. also such things like punishments, ways of transactions of disciplinary issues and ways of rehabilitation. Althought there are people who like to call it early development of a legal system it differs from such:
Some writers have described these disciplinary measures as a Buddhist prototype for legal justice, either praising them for their insightful contribution to legal philosophy or criticizing them for their shortcomings as legal procedures. Both the praise and the criticism miss the point. Unlike most modern judicial procedures, these measures do not function as retributive justice. They are not retributive in that they are not ways of making the offender "pay" for his wrong doings (the principle of kamma will see to that); and, viewed in terms of retribution, they are unjust (or at least not necessarily fair) in that there is no concern that bhikkhus with equal offenses will undergo equal penalties. With the one exception of "further punishment" (see below), each allowance for imposing a disciplinary measure states that a Community if it wants to may impose the measure on a bhikkhu endowed with certain qualities. Only in the case of that exception do the texts say that it must do so. ― BMC2 - Disciplinary Transactions
For everybody who likes to know more about the system of function of Buddhas society, it's worthy to read more of the Buddhist Monastic Code II.
To understand Vinaya general, read the Introduction in Ven. Thanissaro's BMC I
"Discipline is for the sake of restraint, restraint for the sake of freedom from remorse, freedom from remorse for the sake of joy, joy for the sake of rapture, rapture for the sake of tranquility, tranquility for the sake of pleasure, pleasure for the sake of concentration, concentration for the sake of knowledge and vision of things as they have come to be, knowledge and vision of things as they have come to be for the sake of disenchantment, disenchantment for the sake of dispassion, dispassion for the sake of release, release for the sake of knowledge and vision of release, knowledge and vision of release for the sake of total unbinding through non-clinging." — Pv.XII.2
It's worthy to note that the part-taking on the community as well as to it's standards is voluntary and so most means, which are based on willingness to stick to them, see the welfare of the development of each individual as prior. The whole system would not really work for a strong corrupted heart and others as the usual of wordily systems it's very needed to approch the standards with the will to be without a mistake and joyful to fulfil the standards of the Noble One and bend one tendencies rather to study the standards to find possible ways to stick by ones desires without being touchable. For a strongly corrupted heart this tools would work for ones personal welfar.
The transactions are always "punished" by the need of confession, and if the misdeeds are stronger penalties can (! Note, don't must, exept in some cases) layed down by the community.
The heavierst punishments is the leave of the order without any possibility to join again and cover heavy offences in regard of taking life, taking what is not given, sexual intercourse and lying.
There are no kind of physical punishments aside of restrictions from certain use of community properties and benefits.
There is also nothing like a physical prision.
How ever, in regard of prision one should understand the holly life or to ordain as monk or nun like a volunatary imprisoning to bend ones ways and who ever sees such as a gift and way to actually win over oneself and get right of any defilement, become a upright person, a Noble One, uses the support of the Noble Sangha and his tools right and for the benefit of him/her self and all others.
It's a very lage topic and it's not right to say that a society would function without any system of regulation and precrepts.
If many would take on the voluntary imprisoning within a community of admirable friends and elders and always seek for them, nothing than best posdible peace can be aspected. A peaceful and righteous life and community around on depends on ones own past and present efforts to give such to his/her community and its members first.
In ways of demanding and call for rights problems will naturally increase for societies of people merely hold such views. Such communities break apart within a very short time and such appereances thought of positive, called revolutions, destroying all means hardly developed over long time.
Althought there are often undertakings from such as "buddhist" lawyer to develop systems of Vinaya also for normal sociaties, it's not really possible and always would lead to misunderstandings since the aims of the individualls are different, for the world is becoming and for the Sangha of Buddhas disciples going beyond becoming and possible keep such an alternative as long as possible alive in this world.
(Note: This is a gift of Dhamma and not meant for any commercial purpose or other wordily gains)