Below I outline a number of questions the GM should answer for their legal systems. It may seem quite a task to answer each of these questions for each nation/culture the GM is planning to develop. It is worth bearing in mind, however, that these issues arise for each legal system rather than each culture. Thus, if a number of different cultures share a common legal inheritance, the GM need only concentrate on the root legal system, and make changes where necessary for the other cultures (consider the British Empire, later Commonwealth).
While this should reduce the number of different legal traditions you incorporate into your setting, another factor should increase it. Even a single nation state can have a number of different legal systems. For instance, a Middle-ages nation might have (i) the King's criminal law, administered by King's officers and used to punish the most serious crimes; (ii) the King's civil law, administered by King's officers and used to resolve disputes between individuals; (iii) the Church courts, administered by clergy and used to deal with particularly spiritual offences and disputes, or perhaps any offence committed by a member of the clergy; (iv) local courts, administered by powerful land-owners, and with general authority for minor offences and small disputes. I find a variety of legal systems operating within a single state produces a good atmosphere, and plenty of useful plot possibilities!
In some settings, the answer might be "from some superior being". Assuming that divine intervention does not occur every time a legal issue is raised, however, even an intervention-rich setting will make use of one of the other possible sources of law.
Oral Tradition. Law is handed down by word of mouth. Often particular individuals will be recognised as having especially good knowledge of the 'old law', and may even have a special title. Such individuals may take steps to pass this knowledge down to an apprentice and/or family member. There are obvious limits to how detailed laws passed down in this way can be. Also, declaration of such oral traditions is much more than just a memory test - when the law is applied to a new situation, this too may enter the tradition. Finally, repositories of this oral tradition may quite happily invent new laws, and derive authority for them from the corpus of traditional law. Example : pre-14th century Manx Breast Law.
Documented Oral Tradition. Not as silly as it sounds, this means that the culture has written down such oral traditions as existed at the time, and then proceeded to keep track of later declarations and applications of law. Laws can be more convoluted, and can become a subject for bookish study rather than memorising. Just because the laws are written down somewhere does not mean they are accessible to everyone - at one time, many important English legal records were in a special script indecipherable to the untrained. It does, however, mean they are potentially accessible to a wider range of people. Example : English common law.
Decree. Law is handed down by an official within the State. New laws are expressly declared to be such, rather than concealed as oral tradition. The official may well have limits to the decrees they can lay down (e.g. a Minister for Health would have limited power to make decrees governing the armed forces), and be subject to express political pressures. Example : Acts of Congress.
Code. Law is handed down by an official within the State, but the law purports to incorporate existing tradition, earlier decrees and the like. In an ideal world, the Code in an area will contain all the relevant law. In practice, things are not so tidy, and even a very detailed Code will soon start to accrue decisions and opinions on its exact meaning, which must also be known if the Code is to be understood.
As the last type illustrates, these different forms of law are not mutually exclusive. The balance between them in the legal system is an important feature in giving it a distinctive feel. Try to estimate not only how important the different forms of law are, but how well-established the law is. A law based on a 200 year old tradition is likely to be different in form, social recognition, and relevance to a decree issued by the central state two months ago!
Often, the person with the most interest in enforcing the law is the person who has suffered loss through its being broken. So, often the aggrieved person ('the Plaintiff') has some right to bring the alleged violation of the law to the attention of the determining body. This is especially the case in civil actions, where the principal purpose of the law is to regulate relations between private individuals and compensate them for loss suffered. In some cultures, however, responsibility for starting a criminal action also lies with the individual aggrieved or, if he is dead, his family. This is especially the case when the State has relatively limited funds
Sometimes, however, a public official might have special responsibility for bringing particular actions - in extreme cases, the person aggrieved has no right to bring an action. This is more common for criminal actions, where the State has a whole has an interest in dealing with the breach (in old English law, the crime was 'a breach of the Sovereign's peace' rather than of the aggrieved persons rights). Public officials typically need funding, and as well as a special responsibility may have special powers. They are more common where the State is quite powerful, but might also arise as a result of the local community delegating their general responsibility for dealing with criminals to a single, full-time, individual.
It is worth briefly discussing criminal law enforcement. At one end of the scale, there may be literally nobody responsible for enforcing criminal law. If a crime is committed, it is up to a private individual to organise an investigation - possibly through hiring professional 'thief-takers' - and a prosecution. Often, he may have neither the resources nor the inclination to do this. A stronger form of law enforcement has a particular office holder responsible for bringing some criminal actions, and carrying out some investigations, but essentially relying upon the local community to help them when required. At the far end, a professional, full-time law enforcement body has special duties, resources, training, and its own agenda!
In some systems, the party who feels aggrieved may be considered the suitable arbitrator of the law. There are some problems with this - not least that the difference between legal action and personal vengeance becomes rather blurred. Even cultures which have this as their basic determining mechanism will often have a tradition of particular individuals being relied upon for their good judgement, and social pressure upon parties to have recourse to such individuals. In most systems, a particular individual is responsible for determining the law, and applying it to the facts. It is worth bearing in mind that different individuals might have very different responsibilities (or jurisdictions). For instance, at one time an English felon could escape being hung by the King's court by claiming 'benefit of clergy' and being punished by the more lenient Ecclesiastical court.
Direct channelling. In very magically rich settings, resolution of legal disputes may be the monopoly of those able to make a direct link to divine powers, who then give judgement. This would produce a very distinctive legal system, and is not something I have either explored, or would recommend. In terms of game-play, it could produce a rather stifling effect. Of course, a group which only pretend to do this might be much more interesting...
Office Holders. As well as professional judges, in some cultures local magnates enjoy judicial powers as a perk of their property. There may be obvious conflicts between the interests of such magnates and a fair trial, and some legal systems develop by the whittling away of the jurisdiction of the magnates, and an increase in the role of professional judges. Professional judges can constitute a power-group of their own, and often seem very insular as a result of their shared backgrounds, trained, and work-experiences. The ultimate professional judge might be an Expert system, although arguably those who feed it with data would in turn develop into a professional caste with similar powers.
Juries. Popular in some systems, and worth detailing mainly because they have fulfilled two very different roles in their chequered history. Originally, the jury were expected to know the facts of a case from their own local knowledge - so in a boundary dispute the jury would be expected to remember where the boundaries traditionally fell, in a criminal case they would bring the local reputation of the accused with them. Later, this sort of local knowledge was regarded as less important, and the jury were expected to decide the facts of the case on the evidence put before the court. So, their role became that of 'common sense' deciders of fact, while a legal professional (typically a professional judge) directed them on the law.
Whoever determines whether the law has been breached, there are two technical factors worth bearing in mind.
Firstly, most legal systems have some limited recourse for appeal, especially from the lowest judges. Appeals can be quite wide-ranging, especially when they are to an official such as the Sovereign, but in more sophisticated systems the grounds for appeal can be very limited. Nonetheless, this is a potential control of those who make decisions, especially professional judges considering acting corruptly. Of course, if the judge knows any appeal will be resolved in his favour, the limit may be minimal.
Secondly, you should consider the role of lawyers in your legal system. There may not be any professional lawyers at all, or at the very most locals with a different trade, with limited practical experience, happy to argue their neighbours' cases for a small sum. In more technical systems, a closed caste or profession may enjoy special privileges in court - entry to this profession may require only registration and some sort of apprenticeship, or a prolonged period of study and professional qualification. As a rule of thumb, I would suggest that the more clearly developed a legal profession is, the more technical a legal system is likely to become, and the more need for the services of a legal professional.
There are two different issues here - what are the consequences of a decision, and how are those consequences imposed? To consider the first, a decision against one party might result in them having to pay compensation to the other; agree not to act in the same way in future; pay a fine; be physically punished or executed; imprisoned; required to work or undergo rehabilitation programmes; exiled; or have a radical change of status (e.g. brainwipe, slavery).
The range of enforcing bodies is really the same as the question of who can bring an action in the first place, but you should not feel that the same decision has to be made for both ends of the process. There would be nothing inconsistent in requiring a private individual to prove the defendant had committed the crime, and then having a public official (e.g. gaoler) enforcing the decision against them.
This can be something of a red-herring when designing a legal system. Unless your setting assumes that magic/very high technology has suddenly appeared in the culture, then the society has been developing its law at the same time as its magical/technical expertise. While there may be occasional time-lags, you can generally assume that the competent, interested people responsible for the legal system have not left any obvious loop-holes to be exploited by a junior mage in a single play-session.
Nonetheless, people equipped with specialist magical powers/technical equipment may pose special problems to law enforcement, court systems, and punishment. For instance, a mage may have virtually undetectable ways of covering up a conventional crime, or be able to inflict special harms on victims (e.g. mental violation), or be relatively immune to some forms of punishment. Does an elf necessarily treat six years imprisonment with the same gravity as a human?
A legal system can meet these challenges in two different ways, and is likely to use both. First, it may simply extend mundane laws to the difficult realm - e.g. defining grievous bodily harm to include involuntary shape change; or providing that a braintaped clone is a different legal person from the original, and thus has no property rights. Second, it may provide special rules and organisations to deal with those with problematic abilities - e.g. providing for special protection for those judging graduates of certain magical colleges; authorising and empowering a special body of police for investigating crimes seemingly committed by those with psionic powers.
Law can provide an exciting and useful element to a role-playing campaign, as well as fleshing out the society and culture of the setting the GM is trying to create. There are a few obvious uses to it.
Firstly, it can provide a restrain upon PC abilities, requiring forethought to make full use of their powers. As an example, if offensive weapons are illegal, PCs will either limit themselves to non-violent ways of resolving difficulties and legal means of causing violence, or only take such weapons with them when they think the risk of being arrested is outweighed by the need for the weapons. I find the latter is a useful, and dramatic decision for players to make. PCs used to roaming around with legal stun-pistols may gulp and look at one another meaningfully when they dig the Uzi 9mm from the tin-box under the garden shed.
Secondly, it can provide plot devices or motivations for NPCs. Due to my own professional background I often make use of law or lawyers in adventures. I've made use of technical rules for official auditing of the books of registered charities in Middle-Earth; squabbles over inheritance in a cyberpunk setting; expiry of leases in Call of Cthulhu; and misuse of drugs virtually everywhere. It is worth stressing that these technical rules were entirely fictional. If you feel self-conscious about inventing laws out of thin air, most histories have some discussion of ancient laws in them.
Thirdly, it can add depth to the consequences of PCs actions. If there is a fairly detailed legal system, with a fairly decent level of enforcement, the PCs may well end up haunted several months down the line by an action successfully concluded in the short-term. I like anything which makes the PCs feel they are part of a world broader than a series of linked scenarios.