In the real world, the history of law in pre-industrial states is as sprawling and complex as can be imagined, and includes all kinds of unique and fascinating systems, from the Code of Hammurabi to the Gragas, and much else besides.
But worldbuilders who are interested in creating a fantasy legal system need to set priorities, and organize their information to create a convincing but alien legal system in the broad strokes. To this purpose, even a basic theoretical approach to structuring a fantasy legal system could be helpful for worldbuilders lacking strong knowledge of law or legal history, among whom I count myself.
What are the vital questions I should ask myself when building a fantasy legal system?
Anyone can design a list of laws and penalties, decide which crimes warrant harsher punishments, and determine which social groups the law is designed to serve. All that is pretty trivial, so a good answer needs to find questions the average worldbuilder might not ask. Just for some throw away examples: Are lawyers professionals? Is the prosecution independent? Do some witnesses carry extra legal weight? Who is obliged to carry out sentence? There are certainly other questions to ask and better ways to organize them, but that provides a decent starting reference.
- A generally Earth-like world with humans.
- A classical or medieval point of reference, 1500 AD or before.
A focus on law relevant to most stories. So criminal beats civil, without necessarily excluding it.The importance of other forms of law was pointed out in the comments, so I'll strike this point.
- No magic.
An ideal answer would hit the most important questions, creating a shortlist suitable to a classical or medieval society. Drawing on historical or real world examples to show why a particular question is important is encouraged but not required.
Just to be clear, I am not asking for all of the questions that are relevant to creating a fantasy legal system. That would be crazy. So while you're more than welcome to fit whatever you please into an answer, what I'm asking for is the most important questions that your average worldbuilder might not think about, preferably structured so that by answering them you can create the skeleton of a legal culture.