An individual who breaks a law that conscience tells him is unjust, and who willingly accepts the penalty of imprisonment in order to arouse the conscience of the community over its injustice, is in reality expressing the highest respect for the law. Dr. Martin Luther King, Jr.
Civil disobedience is non-violent and public disrespect for a law which one considers to be unjust, accompanied by a willing acceptance of the consequences of this disrespect. The purpose of civil disobedience is to highlight the injustice of a law and hence to work for the abolishment of the law. The assumption is that actions which highlight an injustice can contribute to its abolition, which is an reasonable assumption at least in a democracy. In a democracy, there should be other procedures to abolish injustices, such as representation, free speech, freedom of assembly and association etc., but no democracy is perfect and therefore a more extreme measure such as civil disobedience may be necessary. The American Civil Rights Movement, which operated in a manifestly imperfect democracy, was an example.
However, civil disobedience is a dangerous thing. Laws are important, because without laws and judges and police forces to protect them, human rights are just moral claims, unenforceable and at the mercy of those who are stronger and more powerful.
So you have to be careful when allowing yourself to defy the law. Civil disobedience is not the same thing as the freedom of conscience. You do have the absolute legal right to believe what you want and what your conscience forces you to believe. But it is another thing to be able to act according to your conscience and to break the law because of your conscience; or not to act because of your conscience, as is often the case with conscientious objectors. If you state that everything, even a breach of the law, is allowed as long as it conforms to your conscience, then you go down a very dangerous path.
The freedom of conscience is something different from the right to do or not to do something because of objections based on conscience. You may be forced to do something that goes against your conscience while retaining your freedom of conscience and your beliefs about wrong and right. You can even force yourself to act against your conscience, perhaps because of a sense of duty or because of respect for the rule of law. You only lose your freedom of conscience when you are forced to believe something, which can only happen in extreme circumstances.
Conscience as the ability to know wrong from right is a kind of self-legislation. But because this is fallible (in German they say, “das Gewissen ist kein Wissen”, conscience is not knowledge), and more fallible than common legislation (more fallible because you are alone – two people know more than one – and because you miss the opportunity to learn from discussion and arguments), it should not determine actions when it is incompatible with the laws that are valid in a well-functioning democracy. Only if the external law, as opposed to the internal law, is clearly dysfunctional or unjust as in the quote above, can there be a reason to appeal to your conscience and engage in civil disobedience.
However, civil disobedience is an individual choice, and can it be allowed that individuals decide for themselves whether a system of law is “clearly dysfunctional”? It is dangerous at least, which is why civil disobedience should be an emergency measure only. The risk of anarchy can sometimes convince us to accept a supposedly dysfunctional law or judge, even if our conscience tells us to rebel. Civil disobedience should only be tried when everything else has failed.