In response to the eight white clergy men who denounced and termed as willful breaking of the law the non-violent demonstration in Alabama, Dr. King elucidates the difference between just and unjust laws.
He defines a just law as a man made law which is in agreement with the law of God also referred to as the moral law. On the other hand, an unjust law is a man made law that deviates from what the law of God advocates for. He further expounds using St. Aquinas’s terms that “An unjust law is a human law that is not rooted in eternal and natural law.”
By way of example, he characterizes unjust laws as any laws that degrade human personality, legalize difference and are imposed on a minority who were excluded in the formulation of the very laws. Contrary to the above, he exemplifies just laws as those that make sameness legal.
The previous answer does a very good job of quoting Dr. King to show how he differentiated between just and unjust laws. I would add one more quote from the letter to this. King quotes St. Thomas Aquinas as saying that
An unjust law is a human law that is not rooted in eternal law and natural law.
From this quote and those of the previous answer, we can see that King believed in a law higher than the laws of man. To him, a law was just if it was in accordance with higher law and if it helped to make people better. If it did not meet these criteria, it was an unjust law.
This definition of just and unjust shows us one of the difficulties with the idea of civil disobedience of unjust laws. Most Americans today would agree that the laws King opposed were unjust and should have been disobeyed. However, there is no objective way to determine what laws are just and unjust. To take just two examples from today, a person could argue that laws allowing abortion are unjust and should be disobeyed while, on the other side of the spectrum, they could argue that laws against gay marriage are unjust. There is no way to objectively say whether the right to an abortion or the right to gay marriage “uplifts human personality” or “is rooted in eternal law.” This means that the idea of civil disobedience is somewhat dangerous as it gives permission to anyone to disobey the laws of their country simply because their moral values are not in accordance with those laws.
In his words: “A just law is a man made code that squares with the moral law or the law of God. An unjust law is a code that is out of harmony with the moral law.“
Dr. Martin Luther King in his letter explains the difference between an unjust law and a just law. “Any law that uplifts human personality is just. Any law that degrades human personality is unjust.”
He also believes that “One has not only a legal but a moral responsibility to obey just laws. Conversely one has a moral responsibility to disobey unjust laws”
He is using the example of some laws put into effect by the Nazis during World War II. The Nazis many counries such as the Netherlands, Germany, etc. They enforced a number of horrible laws designed to inflict harm and punishment on the Jews. For instance: It was illegal to hide Jews from the Nazis. Unfortunately many Jews were caught and sent to concentration camps where many suffered death.