Were central jails at all common? Exile?
We have actually recovered many ancient law codes which record acts that were considered crimes and how those crimes were punished. One of the earliest of these is the well-known Law Code of Hammurabi, from the first iteration of the ancient civilization of Babylon, dating to about 1750 BC. The oldest law code we have found is the Code of Ur-Nammu, which is Sumerian and dates to approximately 2100 BC.
You can read the 1915 translation of Hammurabi’s code here (PDF warning). For a full text of the Ur-Nammu code, the Wikipedia article has a translation, which you can read in print in Martha Roth’s Law Collections from Mesopotamia and Asia Minor, pp. 13-22
The major feature of note in these early law codes is the concept of lex talionis, meaning retaliatory law, which you’ve heard of as “an eye for an eye”. Under this sort of system, some sort of punishment symbolic of the offense was inflicted upon the offender. The tongue was cut out for perjury, the hand was cut off if you obliterated a slave’s brand (to set them free, basically it was theft), the hand that struck a father was cut off, the builder of a house that collapsed because of bad construction causing the death of an occupant was executed, etc. The death penalty was also quite freely used, for a variety of crimes, including theft from the palace or temple, selling or receiving stolen goods, kidnapping, assisting or harboring fugitive slaves, stealing taxes, and other crimes. The death penalty was also used for a couple instances of sexual crimes, including incest with ones mother, seduction of a daughter-in-law, rape of a betrothed maiden, bigamy, and a few others.
The Ur-Nammu code mentions murder, and that offense received the death penalty. While the Hammurabi code does not explicitly mention murder, it would almost certainly have merited the death penalty, based on the importance of intent in Babylonian law as well as the frequency of the death penalty for other offenses. If someone could die for building a house badly such that it accidentally killed someone, then surely someone could be put to death for actually killing someone with intent.
Exile was in fact a punishment inflicted for a few crimes, including incest with a daughter. Imprisonment was not as common of a punishment. The Code of Ur-Nammu uses it as a punishment for kidnapping (again, lex talionis at work, depriving the freedom of an offender who deprived someone of freedom).
The most common punishment was a fine, which was for smaller offenses such as breach of contract, property damage, and some minor assaults.
Now, what are the different values put on some of these crimes? Why is theft as bad as murder (in terms of severity of punishment)? Why does a father being struck by his son (a hugely disrespectful move) merit cutting off the hand? Why are internal family matters being legislated by the king?
Roth offers a bit of an answer, and attempts to situate these laws in the ancient Mediterranean system of shame and honor:
Shame and honor are two extremes of one social continuum that has been amply demonstrated to be of paramount importance in Mediterranean cultures from antiquity through to modern times. 20 In the assessment of an individual's conduct, not only the act itself but also the social standings of both the actor and the person with whom he interacts are evaluated. The assessment of these social standings are conditioned both by the value of the person in his own eyes and also in the eyes of others in the group. These assessments place the individual on the continuum which then has a tangible effect on conduct concerning the family, marriage patterns, status mobility, economic transactions, moral actions, and other matters. (p. 25)
The head-of-household's ultimate authority is challenged in both cases, and both should be remediable by private action: the challenged father should be able to do as he likes with his disobedient son, in some other societies up to, and even perhaps including, killing him; and the man whose pregnant wife or slave was injured in such a way as to result in the death of her unborn child or in her own death also should be able to exact whatever revenge or compensation he chooses. But by the Laws of Hammurabi limiting a head-of-household's authority in such private matters, the state (in the person of Hammurabi) takes for itself some of that family authority (p. 27)
(From Martha T. Roth, Mesopotamian Legal Traditions and the Laws of Hammurabi, 71 Chi.-Kent. L. Rev. 13 (1995) (PDF Warning).
The cheek slapping is an affront to honor, she concludes. But the king takes on responsibility for this seemingly personal thing. Social affronts are legislated, and punishments meted out according to the humiliation suffered. It’s a slightly different value system.
As for why theft is so seriously punished, we must consider the importance of trust among people living together. It’s a social contract that my property is mine, and your property is yours. People live together because it’s too dangerous to live alone (raiders and conflicts are quite problematic in these periods, it was much safer to live in a place that could be fortified), and to breach that trust by stealing others’ property is to breach that trust and make the interior of the city no longer a safe, trustworthy place.
So in conclusion, the most serious of crimes (murder, theft, treachery, other serious offenses) were punished by the death penalty. Fines were meted out for the minor crimes, and intermediate punishments varied quite a bit, but often relied on the “eye for an eye” principles of lex talionis. Please note, however, that specific punishments and crimes could vary between ancient societies, the same way crimes and punishments vary between countries today.
Hey! Not to discourage other answers, but I've answered a question about Roman 'prisons' and exile before here, which might answer some of your question. But feel free to ask more!