Medieval crime and punishment is different in many ways from modern crime and punishment. I've talked about medieval law before, but this is the first time I've ever set out to catalogue how it could affect your idea of a fantasy society in any kind of definite way.
The most important thing to note is that there were no penalties of imprisonment in the early and high middle ages. You might be reduced to slavery or forced to pay a fine or even executed, but you'd never become a prisoner as a result of lawbreaking—excepting, of course, the period where you were waiting for your trial. Even then, you'd likely just be kept in the undercroft of a local manor, not a special-built jail or prison or even (gasp) dungeon.
The Anglo-Saxon Dooms
Taking a look at the laws of King Alfred, it becomes apparent that there are essentially two types of punishment: paying the geld (or value) of the crime, or death. In some cases the value of the crime was determined by the value of the thing destroyed or stolen. This is descended from the wergeld, or man-value, of early Saxon times, which was a price you paid the family of someone you killed (based on their social status) to legally prevent a feud from developing.
If you're truly seeking to simulate a medieval society, what you should do is draw up a short sample of fines and then determine what constitutes a capital crime. Capital punishment in the English system (the only one I'm really aware of in great detail at the moment, having not refreshed myself on the customs of Frankia in a long time) can only be dealt out by the king. In his absence, it was the job of the royal assizes to roam the countryside and give trial to those being held for capital crimes (usually, as above, being held in the croft of a manner until the time came for the assizes to try them).
The Process of Trial
The old germanic continental custom of trial was for the families of the accused to gather together in a central place. The accused would swear that he didn't commit the crime and his family would swear also. This would prevent "justice" from being done unless the accused's family didn't back him up—which could be the case, if they knew the accused was a dick and he was constantly making life harder for them by, for example, getting involved in court cases.
In England, the situation was similar though not as clearly one-sided. The accused would be asked to assemble oath-takers from amongst the townsfolk where he was charged. If he could assemble five or twelve of them (I don't remember the circumstances surrounding how many were needed and don't feel like looking it up: if anyone is really interested, leave a comment and I'll go back to the books and get you an answer). Essentially, these oath-takers would swear that the man did not commit the crime. If enough could be produced, he would go free. This clearly favors the social fabric above individual justice, but what is the point of justice if not to knit together the social fabric?