A legal right is distinguished from other types of rights, like probably the ones you're thinking of, human or universal or natural rights.
Legal rights are codified in laws. There was a legal right to own slaves in this country not long ago, it wasn't a human right, and it shouldn't have been...