If the sovereign or its laws are illegitimate then do their sanctions imposed on individuals or groups who do not comply with the laws, legal
In examining cases where the legitimacy of the authority is left in doubt, we must determine whether the authority's legal system and laws are morally justified in making the laws or whether they violate human rights in objectionable ways.
All countries create and adhere to their own rules of law when punishing offenders. In many cases, appropriate punishment is dealt for the severity of the crime committed. The more brutal the crime, the harsher the punishment. But there are nations that impose extreme retribution for even minor misdemeanors, China being a case in point. Each year thousands of Chinese citizens are put to death for petty offences. Many are carried out in secret and thus go unreported. Exactly what criteria nations like these employ to deal out this kind of punishment is a question that compels the investigation of different kinds of laws that operate on a society.
Law of nature deals with morality and the theory tries to recognize a moral compass to guide in the creation of laws (Wikipedia). Usually feelings and notions of what is right and wrong are the underlying principles governing natural law. This could vary greatly depending on various interests. In the case of the countries forming the European Union which signed the Second Optional Protocol, these nations abolished capital punishment. The natural law here has prevailed and won over hearts and minds of leaders and lawmakers into agreeing that capital punishment is wrong and should be eradicated. In nations that retain capital punishment, natural law has not taken roots in governance.
Natural law decrees that anything morally 'right' is law and anything 'unjust' is not a part of natural law. Theorists say that punishment carried out without the use of natural law will be judged by 'higher powers' - that divine retribution will take its course. Natural laws gain respect and credibility when they meet certain requirements such as being impartial and existing in the realm of public knowledge. Without these fundamental requirements the laws are less likely to be recognized or treated with much regard.