Quoting religious texts by definition is not unethical regardless of what tome one is using. Quite the opposite. All laws are grounded in religious values. US laws are mostly based on Judeo Christian values that led to modern day liberalism.
To understand the nuance of what murder vs killing means as an example it can help to understand how the religious tradition that gave rise to the distinction came about. For example, the commandment thou shall not murder is misunderstood and translated thou shall not kill. Many legal cases hinge on understanding how those distinctions gave rise to different interpretations of what constitutes killing vs murder.
When someone in a court case makes a fairness argument justifying a crime, religion has wrestled with this issue for thousands of years and can provide clarity.
However, while religious texts can help provide clarity to the law, it does not serve as a substitute to the law. It is up to the judge to make sure this does not happen.