The basis of (secular) law should be justice. Plato defines justice as "everyone minding their own business". In other words, justice is about harmony and cooperation and privacy and specialisation and expertise and respect: it is about everyone being able to use their talents effectively: it is about the fulfilment of the potentiality of every moral agent.
The business of a judge is to make sure that people DO mind their own business - or, better, to decide whether they are or not. The very idea of justice (coupled with the idea that it is not inevitable, but may be infringed) implies the business of a judge!
This principle of justice is constitutive of what God is. God is perfection. God has no potential which is not fully actualised. God's nature is fundamentally harmonious. Hence Justice is a valid descriptor of God and although it does not exist apart from God - for no being exists apart from the Divine Being - justice defines God, rather than God defining justice.
Hence Justice (and so law) is not religious at root. It is based on the Natural Law - the constitution of things as they are. It is possible for anyone of good will to discern the basis of justice and to make a good attempt at implementing laws to give expression to the idea of justice. Religion's role is to corroborate and motivate folk to live justly: see the OT for tons of stuff about this!
The word "God" is indeed a contraction of "good". In Platonism, "the Good" (but in Greek, or course) is how God is most accurately indicated. The word God is a wonderful indication of the basic nature of the Divine.
The Hebrew Divine Name YHWH (we can only guess which vowels are to be placed amidst this consonant acronym) is thought to be an archaic form of the verb "TO BE". This is an equally profound indicator of the Divine Nature; for BEING and GOOD are very closely related... as I argue in my second non-fiction book "The Good of Being", which I am now looking to get published.