From a great post by Steve Hayward at Powerline that focuses on the views of Martin Luther King. There we find this quote from King:
One may well ask: “How can you advocate breaking some laws and obeying others?” The answer lies in the fact that there are two types of laws: just and unjust. I would be the first to advocate obeying just laws. One has not only a legal but a moral responsibility to obey just laws. Conversely, one has a moral responsibility to disobey unjust laws. I would agree with St. Augustine that “an unjust law is no law at all”
Now, what is the difference between the two? How does one determine whether a law is just or unjust? 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. To put it in the terms of St. Thomas Aquinas: An unjust law is a human law that is not rooted in eternal law and natural law.
“Eternal law.” “Natural law.” Supplemented in the comments by this.
From Rabbi Mordechai Finley on origins of moral law:
“The being that created the universe had the power to bring into being a universe – the one we know of – with the energy and mass of 140 billion galaxies. This being created the laws of the universe that scientists and mathematicians have discovered. I am committed to believing that the God who created the laws of light, energy and matter also created a moral law, that reveals itself to those who study it, just as scientists have discovered the laws of nature. I am a moral realist – there really are better and worse answers to moral problems.”
There is right and wrong. Our duty is to discover the moral law and act accordingly.