Legal rights are, generally, most useful and beneficial. What we think of as rights is a relatively new development in the law. The concept of legal or human rights (as we understand them now) seems to almost leap forth in the 18th century, from somewhere. Perhaps that wretched fellow Rousseau played a part in this, perhaps there was something more complicated involved.
We don't see it much (or at least I don't) in ancient times in the West; I'm not certain we see it at all in the East. Roman law is vast, but beyond the view that certain people are due certain things by virtue of their status--e.g. a Roman citizen being due an appeal to the emperor--individual rights don't factor large in the days extending from the Twelve Tablets to Justinian's Codex.
I've read that the concept of rights has its basis in the idea of natural law. I question this, though. Natural law certainly appears in Roman jurisprudence and may be said to be a factor, even a very important factor, in ancient philosophy, particularly in Stoicism. But if Natural Law engendered the belief that we are endowed by Nature or Nature's God with certain inalienable rights, in my opinion this occurred long after Natural Law had been conceived.
While Stoicism certainly anticipated the idea of a "brotherhood of man" and so recognized the worth of each person by virtue of the possession of a part of the Divine Reason, and its maxim that we should live according to nature indicates that nature provides us with rules which should govern our conduct in life, I don't see this as equivalent to the belief that each person has certain rights. Indeed, the concept of rights as we understand it seems foreign to Stoicism.
We say we have a "right" to something when we believe that we are or should be free to do something or possess something. We have a claim to it; we are entitled to it, to the exclusion of anyone else. Stoicism teaches us that things beyond our control are indifferent. It urges us not to disturb ourselves with them, not to seek or desire them. What else is the claim to have a right to property but a claim that one is entitled to something beyond our control? Epictetus tells us not to be disturbed even by the loss of a loved one, or disturbed no more than by the loss of a favorite cup. It would be bizarre for a Stoic sage to maintain that he is entitled to anything, even to his own life. Nature/God will determine when we die and how; we should be prepared to die, but our death is one of the things beyond our control It's in the nature of a gift, a natural part of life.
Stoics tout the freedom one has from others and other things, but that freedom derives from the recognition of that which is indifferent to us and our own self-discipline. The Stoic has no conception of a right to be free; one can be free even if in prison, as one maintains sovereignty over that which is truly in one's control.
For my part, I believe the only rights we have are those recognized by the law, that is to say, legal rights. Certainly those are the only rights which are enforceable. Legal rights, though sometimes conceived of as possessory, in fact result from restrictions imposed particularly on governmental power. We have no right of free speech, for example, in the law. We have the First Amendment, though, which prohibits the government from restricting free speech. Legal rights therefore often exist purely because the law prohibits certain conduct by others. I can speak freely in the sense that the government is unable to prevent me from doing so.
When we speak of rights outside the law, whether we call them natural rights, inherent rights, god-given rights, we purport to refer to what has application only if protected by the law. We treat them as if they are legal rights, though they are not. We claim to be entitled to certain things or entitled to do certain things by virtue of non-legal rights.
It seems to me that when we employ the concept of rights in ethics, we take an idea which has a beneficial function in the law and employ it where it has no function at all or a negative function. Rights are something we have or claim. Our interest in them is selfish. We don't see rights as creating duties to others. If we have the right to do and think what we wish, even if that right is qualified so that our right to act and think may not be used to harm others, we may do as we please even if we are cruel, envious, uncharitable, craven, contemptible, gluttonous, miserly. We may be utterly unworthy, and are not only free to be so but have every right to be so.
In other words, we have the right to be wrong, bad, immoral as long as we don't infringe directly on the rights of others. This is an ethics which sanctions, if it doesn't actually encourage, the disregard of the suffering of others.
I've always been a proponent of civil liberties, and still am. Legal rights are essential to our freedom and so vastly significant in the law. But rights seem a poor thing on which to base a code of morality.