Rights don't make much sense to me outside the context in which they were initially popularized, which is early modern Christianity, or at least theistic religion.
To the best of my limited knowledge the argument goes thus:
A creature ought to act according to its true nature, as given by God. Imposing against a creature's true nature is a violation of natural law: that is, it is a rebellion against the will of God. An animal enjoys the protection of an injunction against impositions against its capacity to fulfil its true nature. If you're an early modern Christian whose holy book instructs you to
have dominion over the fish of the sea, and over the fowl of the air, and over every living thing that moveth upon the earth
Genesis 1:28, KJV
an animal's true nature generally includes its capacity to serve humans, within reason, so that's not a call for animal liberation.
The true nature of a person, if you're an early modern Christian, is to serve the divine will. Preventing a person from seeking and serving the divine will is therefore a violation of natural law. A person's rights are the entitlements that a human requires to seek and serve the divine will. From this: life, autonomy in body and property, self defense, knowable and reliably enforced laws, freedom of conscience, freedom to communicate, etc. If a child can seek and serve the divine will, by that very fact, he or she has rights. If a child is too young to seek and serve the divine will, he or she has no rights, but nonetheless enjoys the protection of an injunction against impositions against his or her capacity to fulfil his or her true nature. A child's true nature is to grow into a healthy adult.
Secular rights are either hollow echoes of this concept having been fossilized into cultural norms, or they are ought... if reconstructions of universal moral principles pertaining to
entitlements (not) to perform certain actions, or (not) to be in
certain states; or entitlements that others (not) perform certain
actions or (not) be in certain states.
Stanford Encyclopedia of Philosophy
Of course the Christian origin is also an ought... if. You ought to do such and such, if you want to act in accordance with the divine will, or if you want to go to heaven. The secular equivalent usually comes down to if you want to live in a society that is conducive to human flourishing. However, if acting on such a premise, there can be no appeal to "true nature, as given by God" and hence using the language of rights is something of a misnomer - really these are just assertions that certain ought... if statements apply universally. Ought-if statements can apply universally to a person's or an institution's behavior towards a child, an infant, an animal, a fetus, a bacterium, a rock, or an incorporeal idea. Without the elevation of "true nature" to a moral good in and of itself, there's no bright line separating "rights" from any other universally applicable moral principle, just habit and linguistic drift.
I'm not trying to cast aspersions upon the potential quality of atheistic moral codes. One can arrive at conclusions that are all the stronger / better for being based on an ought... if that doesn't require the hard-to-defend premise that the will of God exists and is knowable and is knowably good. I'm just saying that the line between which of those principles are rights and which of them are injunctions against abuse is arbitrary, since the principle that originally separated them is excluded from the premise.
Re: other things called rights, history, various comments.
If a right is any entitlement granted by agreement between persons, then obviously Christianity-influenced thinkers didn't popularize them. In fact, such "rights" predate homo sapiens by millions of years.
Whosoever removeth the parasites from the back of Ug shall be entitled to Ug's removal of parasites from his or her back likewise. But he who tricks Ug into removing his parasites, but removes not parasites from Ug, upon him the wrath of Ug shall fall.
Ug the Australopithecine, probably.
Likewise, if rights are entitlements granted by a sovereign, then any code of laws includes rights, either explicitly as entitlements, or implicitly as punishments. For example, Hammurabi's code includes a penalty for raping another man's slave, which implies that a man is entitled to have his slaves not get raped by anybody except him (or at least to be compensated for it by the perpetrator).
Likewise, if rights are reciprocal duties agreed upon by members in a feudal or imperial hierarchy, they distantly predate Christianity, much the less early modern period (that is: about 1500 to 1800, give or take a few decades), and probably were invented independently by many unconnected peoples.
Agreements between persons, entitlements granted by a sovereign, and reciprocal duties between e.g. tiers of a feudal hierarchy, are all indispensable intellectual antecedents to the concept of rights. The particular evolution of western European and especially English feudalism seems especially important. I don't feel qualified to guess whether it was a necessary precondition or just an important shaping factor.
The OP, however, and this response, address rights defined as entitlements that accrue upon persons by sheer dint of personhood. Whatever their historical intellectual antecedents, human rights are distinct from agreements between persons, contractual obligations, or entitlements granted by a sovereign.
If anyone would care to present evidence that widespread belief in entitlements that accrue upon persons by sheer dint of personhood emerged elsewhere in time and space than Europe in the early modern period, I would love to see it - and especially the argumentation that those past thinkers used to arrive at the conclusion.
If anyone would care to argue that I'm just plain wrong about the historicity of the theistic argument in the segment from "A creature..." to "healthy adult", I would love to see it.