It is important because rules need to be established in case someone breaks them (and people tend to). If they aren't written, smooth-talkers will be able to talk their way out of punishment while less charismatic people will be punished more severely, and some judges will be far kinder than others (warning versus jail term). It is also harder to say "we need to punish domestic crimes more severely" when there is no set rule or punishment. Simply put, written laws are required to keep the rules and punishments universally fair.
Fairness is very important in society, mainly because people expect it from those who are supposed to be governing them. If people feel something is unfair, they can react rather violently, and it may even split up the society into factions.
If you write it down, then people can't lie about it or make mistakes in remembering it. Generally, writing things down as a part of the lawmaking process gets everyone to understand what the law actually says. There's a story of the five blind men and the elephant. Each touched the elephant and reported that the elephant was a rope (tail), a tree trunk (leg), a fan (ear), a serpent (trunk) or a house (body). Oral recitations of the law can become like that.
Importance of unwritten lawBut, even ofrulesofdecision, thesmallestpart is the result of State action. Everysort ofprotectionof rights by the State begins with enforcing the payment of compensatorydamages, which in primitive times the injured party sought to recover on his ownauthorityand by his own power. At the moment when the judgment of acourtis substituted for this primitive self-help, there are no rules ofdecisionin existence except those flowing from the verynatureof the social organization.In other words, they are derived from such sources as the nature of property in the form it assumed directly under the conditions of primitive ownership; also from the nature of those associations