Religion, rather than secularism, provides a secure basis for human equality and rights.
Most, if not all, modern declarations on human rights are premised on a doctrine of equality: The view that there is some fundamental sense in which all people are prima facie worthy of equal respect as equals in a just society, regardless of race, sex, strength, colour, intellect etc, and therefore we should treat them as equals or strive for some measure of equality in outcomes (even if not total equality in outcomes).
But if naturalism is true (there is no god and the physical world is all that exists), then there is no basic sense in which we are equal. We share some genetic information in common, but we all have different size, shape, strength, colour, intelligence, work ethics, skills, attractiveness, social utility and so on.
Therefore if naturalism is true, then most, if not all, modern declarations on human rights are premised on a false view of human beings.
By contrast, if a theistic view is correct (i.e. there is a god), then although basic equality does not automatically follow, basic equality is possible. For if theism is true, then there exists the possibility that human beings are intentionally vested with dignity by the intent of their creator, that their creator has a basic love of humanity, that humanity is in some sense made in the image of their creator to be like their creator, and that their creator requires us to regard each other with a basic respect.
Theism provides a metaphysical basis for the liberal doctrine of equality, but naturalism does not. The awkwardness of this truth for some people is only exacerbated by the fact that some opponents of religion accuse it of perpetuating inequality and claiming that a secular outlook is more conducive to human rights.