A wiki article covers this topic by mentioning:
The Modern English word right derives from Old English riht or reht,
in turn from Proto-Germanic *riχtaz meaning "right" or "direct", and
ultimately from Proto-Indo-European *reg-to- meaning "having moved in
a straight line", in turn from *(o)reg'(a)- meaning "to straighten or
direct". In several different Indo-European languages, a single word
derived from the same root means both "right" and "law", such as
French droit, Spanish derecho, and German recht.
Since it mentiones the Proto-Indo-European language, I must elaborate a little.
The Proto-Indo-European language is the common ancestor of Indo-European languages, which include, among others, the Balto-Slavic, the Italic, and the Germanic branches, so basically it's the ancestor of all languages that are now present in Europe. There's some good coverage on wiki that you can check.
So basically, this word has the same meaning in so many languages, because it came into them since the Proto-Indo-European. Since then, of course, each concrete word in each concrete language has undergone different changes, which resulted in modern words looking different in different languages now, but still sharing the same meaning.