I hope I can help! :)
The theory of natural law states that all the laws based on morality are good for humans. Any law which is good for humans must be based on the moral grounds.
It helped the lawmakers and philosophers of the Enlightenment in framing laws which will create positivity in people and it gave a link between philosophical concepts and legal theories.
Have a great day/evening/night! :)
Let me know if you have any additional questions!
-Kappifilms