Ronald Dworkin, who died this year, was one of the great legal philosophers of the modern era. His books Taking Rights Seriously (1977), Law's Empire (1986) and Justice in Robes (2006) made him famous as a defender of the role of courts in modern politics, both in the US and – if he had had his way – in the UK. He was a proponent of the "right answer" thesis (there is a right answer for judges to find, even in the most difficult cases), the value of legal integrity (interpreting legal provisions, we should aim to make the law, as a whole, the best it can be) and the idea of rights as trumps (individual rights should prevail not just in the face of tyranny but even against good-hearted efforts to promote the general welfare at some individual's expense). These are massive and enduring contributions to the philosophy of law, each of them adding riches and colour to our jurisprudence.

But this, his last, book, Religion Without God, is about value and religious experience. What's the connection wtih jurisprudence? Why was this occupying the last days of our most prominent legal philosopher?

There is a flourishing field of law and religion concerned with religious law (canon law, for example, and Islamic law), the way in which religious traditions, in history, have influenced the development of secular legal systems, the importance of religious values in underpinning the deepest commitments of our legal system, and the ideas of toleration and freedom of worship. There is a huge legal literature about religious establishment and the application of laws to those whose religious practices they affect. (For example, in 1990 the US supreme court refused an invitation to strike down certain narcotics laws under the first amendment's guarantee of religious freedom on the grounds that they inhibited the sacramental use of peyote in native American ceremonies.)

For the most part, however, Religion Without God is not about any of this. The book is based on the Einstein lectures that Dworkin delivered at the University of Bern in 2011. In those lectures he addressed questions about the meaning of life and the sublimity of nature, about the intoxicating experience of celestial and earthly beauty, and about our commitment to objective goods whose value transcends the preferences of those who keep faith with them. Dworkin believed that in all this there is something of the religious attitude to life, even though in his own life – and, he says, in Einstein's too – there was no belief in what he called "a Sistine God", no place for worship, creed or redemption. He went further. Our recognition of objective value, Dworkin argued, must be prior to anything we say about God. It is certainly prior to any role that divine command or example can play in ethics. He would have agreed with Immanuel Kant: "Even the Holy One of the Gospel must first be compared with our idea of moral perfection before he is recognised as such." If a religious attitude lies at the foundation of ethics, it must be religion without God.

Judges often have to decide what counts as religion. In 1965, the US supreme court decided that someone who had doubts about the existence of God but who professed a "belief in and devotion to goodness and virtue for their own sakes, and a religious faith in a purely ethical creed" was entitled to an exemption from military service – even though previous interpretations of the Selective Service Act confined such conscientious exemptions to those whose opposition to war arose out of a belief in a supreme being. Dworkin approved of this result, and argued that the US constitution's freedom of religion clause should be understood generally as protecting people's ethical independence, not as privileging the worship of a Sistine God.

The Einstein lectures were not the first time Dworkin considered these matters. Twenty years ago, in Life's Dominion: An Argument About Abortion, Euthanasia and Individual Freedom, he suggested that a belief in the sacredness of life was not confined to those who opposed euthanasia and abortion. He offered a secular account of "sacredness", which he thought was a form of objective value "independent of what people happen to enjoy or want or need or what is good for them". On this account, pro-choice advocates might profess a belief in the sacredness of human life too: they would just give a different account of what the ultimate value of life consisted in; an account they found compelling, that emphasised the glory of what people have made of their lives as much as the biological humanity:

The life of a single human organism commands respect … because of our wonder at the divine or evolutionary processes that produce new lives from old ones, at the processes of nation and community and language through which a human being will come to absorb and continue hundreds of generations of cultures and forms of life … and … at the process of internal personal creation … by which a person will make and remake himself, a mysterious, inescapable process in which we each participate, and which is therefore the most powerful and inevitable source of empathy and communion we have with every other creature who faces the same frightening challenge. The horror we feel in the wilful destruction of a human life reflects our shared inarticulate sense of the intrinsic importance of each of these dimensions of investment.

This was a valiant attempt to find common ground in a series of intractable debates, though I am not sure that it convinced anyone who held what we conventionally call a religious view of euthanasia or abortion.

Beyond these specific debates, the position taken in Religion Without God reflects a commitment to objective value that has been indispensable for Dworkin's broader jurisprudence. Part of what he meant when he maintained that there was always a right answer to a hard case facing a court was that even if the relevant precedents, legislation and constitutional provisions left the judge with a choice to make, the values that would have to be invoked to guide this choice – rights, justice and the common good – were as real and objective and compelling as the parchment on which the black-letter law was printed. What was distinctive, though, about Dworkin's view was that objective moral values were not invoked in law in their raw philosophical form. Dworkin believed that legal rights and legal principles entangled moral and legal elements together: one would call them "hybrids", if not for the suggestion implicit in that term that pure law could be imagined without this entanglement. In Dworkin's view, law was infused with value and principle through and through.

There was no algorithmic formula for distilling these moral values out of laws, no easy-to-apply rule for recognising their presence. Legal judgment was a matter of argument and discernment, and the sensibility involved had to be partly moral but at the same time attentive in complex ways to what had been enacted and the significance of precedent decisions. That was what lawyers and judges were doing when they delved doggedly into the books of the law to search for legal answers to hard cases. They didn't just abandon the quest and start making new law at the first sign of difficulty. They would keep on at it, respecting the position of plaintiffs and petitioners as people coming into court to seek vindication of their rights, not just as lobbyists for a quasi-legislative solution to some intractable legal problem.

In a generous and good-humoured way, Dworkin practised what he preached. He too loved argument – the endlessness of it, the scintillation as connection after connection was made. He was not one to allow himself the last word in any controversy, let alone anyone else. He believed that perseverance in argument – the worth of persevering in argument – was the best tribute to the rights and values and principles at whose altar, in a manner of speaking, he worshipped.

And all this was seamlessly bound up with fierce conviction about the real world of constitutionalism and the rule of law. Dworkin's death has led many people to reflect on the role of a public intellectual in explaining the workings of constitutional law – in all its intricacy and controversy – to the general public. His contribution, mainly in the pages of the New York Review of Books, was prodigious. He published almost 100 essays, reviews, and articles in the Review over 45 years, from a seminal piece on not prosecuting civil disobedience in 1968, through powerful comment on the affirmative action cases of the 1970s, on the Robert Bork nomination in 1987 and the Clarence Thomas nomination in 1991, on abortion, pornography, and assisted suicide, all the way through to the Citizens United case in 2010 on corporate speech and other things he called the "Embarrassingly Bad Decisions" of the Supreme Court under John Roberts.

He believed in law, though there was nothing deferential in his writing. Dworkin had a great faith in courts as forums of principled argument, and though that faith must have been shaken at times, he never gave up on the idea that the these institutions had a salutary role to play in a democracy. Better still, he never gave up on explaining to his readers what was at stake in the decisions he described. You didn't have to agree with him to see the immense contribution he made by talking publicly about this. The courts matter to citizens, and so does the law (their law) – that's what he thought.

We have nothing like that in Britain, no one of his stature and perseverance to explain in an informed and elegant way what the UK supreme court is doing or the European court of human rights. Perhaps Stephen Sedley is beginning to fill this role, but no one has filled it for us for as long as Dworkin did for his readership in and beyond the US. I think that the crisis in this country regarding the legitimacy of the Strasbourg court has been aggravated by the absence of any such commentator, anyone who might have shown us regularly, on issue after issue, case after case, why the court matters here, why the issues that it confronts matter, and why the law that it brings to these issues matters too, in a way that admits of better or worse reasoning, right and wrong answers.

I am no great fan of judicial review of legislation; but I know that a case can be made in its favour and Dworkin made that case, as much in his critique of what the American courts were doing as in his engaging defence of the very idea of constitutional values. I would much rather answer his presentation of that case – by someone who made an honest effort to reconcile it with democracy – than stand with those in Britain who respond in a thoughtless, negative and sometimes even xenophobic way to the judgments of the human rights court in Strasbourg.

A year or two before Religion Without God, Dworkin published Justice for Hedgehogs, a huge book (in every sense) that aimed to bring together apparently disparate principles and values under the auspices of one master ethical conception. Isaiah Berlin followed the Greek poet Archilochus in distinguishing between the attitude of the fox, who gathers many separate things, and the hedgehog, who knows only one big thing. The pluralism of the fox "has ruled the roost in academic and literary philosophy for many decades," said Dworkin; but he wanted to defend the unity of value. His hedgehog, however, was not someone who worried away at a single topic. Instead he worked in the wake of the fox showing that ideas about freedom – which foxes like Berlin regarded as separate from ideas about justice, and separate again from ideas about equality, dignity, legality, religion, ethics, democracy and rights – could in fact be connected together under the auspices of single respectful ideal. That insistence on looking for connections through argument, not giving up as soon as the going got tough, but thinking that the connections mattered enough to persevere in their pursuit was the motif of Dworkin's jurisprudence and the key to the unity of his philosophical work.

• Jeremy Waldron's most recent books are The Harm in Hate Speech and Dignity, Rank, and Rights.