There is a certain similarity with Biblical laws, for instance, the principle of lex talionis, though there were differences as well, some of them significant. For example, as you all probably remember, the Bible states that God is not a respecter of persons and there will be one law for all members of society, including foreigners with legal status, though slaves were treated differently in some cases. In contrast, Hammurabi's Code made a distinction not only between slaves and free persons, but also between aristocrats and common folks.
They also had a rather liberal use of death penalty, which was used for crimes like theft, burglary, assisting a runaway slave, and in general, all kinds of things, excepting curious enough, various forms of incest; though incest between mother and son was punished by being burned alive. Adultery was punishable by drowning, though the husband had the right to forgive his errant wife, in this case the king had to forgive her paramour.
Babylonians were sure preoccupied with the problem of providing for women. They also knew very well the distinction between being married and shacking up, for the arrangement to be recognised as marriage the contract had to be signed. Interesting enough, though folks had no trouble with drawing this distinction 4 thousands years ago, some still don't understand the difference now.
The wife had to be provided for in the case of divorce or her husband's death. The husband could divorce her at any moment but had to restore her dowry, provide her with an income and give her the custody of the kids. She would also share the inheritance after his death. If she had no children, he had to pay her an equivalent of the bride price. The wife was free to remarry but it apparently didn't change the arrangements.
While Babylonian no-fault divorce was available only to the husband, both husband and wife could use the fault version of it. If the husband could prove in court that his wife was a bad wife, he could send her away keeping the children and the money, or reduce her to the position of the household slave, in which case he was still obligated to feed and maintain her. If the wife could prove domestic abuse and neglect, she could obtain a legal separation and her dowry, however, the husband could file a counter-suit and if he succeeded in proving her to be a bad wife, she would be executed.
Curious enough, if the husband left his wife without any money while, e.g., going to war, she was allowed to live together with another man who would take care of her financially, and it wouldn't be considered adultery, but she had to return to her husband when he came back. The children of her second union would stay with their father, however. If she could prove that her husband willfully abandoned her, or if he was exiled, her marriage was declared null and void, and she could do whatever the heck she chose.
This is all in contrast to the Assyrian laws that were generally very unfair to women which explicitly stated that the husband didn't have to give anything to his wife at all if they divorced, though they had a provision for widows. I'll talk about widows, inheritance and adoption next time.