We say that all humans have the right to life, because while many of us can think of criminals, dictators etc. we would like dead, we can't unanimously agree on this. So we settle for agreeing on the idea that all humans have the right to life.
This then raises the issue of animals having the right to life and four alternatives:
1) animals and humans have a right to life
2) animals have a right to life but humans don't
3) humans have a right to life but animals don't.
4) neither animals or humans have a right to life
2 is rarely argued by anyone, so I'll ignore it.
1 I reject on the grounds of utility. It doesn't work. You cannot live by this philosophy. In practice, nobody does. Even if you are a strict vegan, earthworms and other organisms die when a field is ploughed. Even a strict vegan feeding themselves entirely on zero till agriculture (hypothetically speaking, as such people are rare/non existent) is starving animals by using land to produce food solely for himself. Nature doesn't work on these principles, which is why people who think like this are mainly found in cities, deluding themselves that they are not having an impact on nature, even though their local environment has been covered in concrete for their benefit, and vast industries around the world destroy wildlife to provide them with the food and raw materials which they demand.
This leaves 3 and 4
IMO human rights are a game rule which humans have developed in order to benefit humans. Many animal species show altruism towards related members of their own species, and many have mutualistic associations with other species. In ecological terms, human rights benefit humans and our domestic animals, as well as other species, such as rats and cockroaches which live around us, and benefit from our activities.
Nature works on much larger scale, chaotic feedback systems. There are no rights in nature. The word "right" means a straight line. Related words include regulation, royal, ray etc. Rights are an attempt to regulate nature, but nature is chaotic.
As humans we value the lives of individuals related to us, and attempt to achieve cooperation between humans all over the world (who are actually surprisingly closely related). We value the lives of animals which help us, such as sheepdogs, and sometimes transfer our parental instincts onto animals we call pets. Domestication of dogs seems to have given a huge advantage to humans, as did the later domestication of goats, cows, sheep, pigs, chickens etc. These animals have benefited too. They are far more common and widespread than they would have been in the wild.
Likewise I would choose to raise sheep on mountain pasture, kill them and eat them, in preference to ploughing the mountain slopes to grow vegetable crops, as the latter option would ultimately degrade the entire ecosystem, erode the soil, make the area uninhabitable for humans, wild animals or sheep, and kill millions of soil organisms. The former option would be better for wildlife, better for us and (paradoxically) better for the sheep.
If you kill someone's pet goldfish, they may be able to prosecute you for cruelty, but it is unlikely that you will get prison time. Kill someone's truffle hunting pig or guide dog and you will pay hefty compensation at least. These animals have financial value.
We can't totally reshape nature according to our own designs. Certain wild animals such as earthworms, salmon, bees and whales have proved to be extremely important for the functioning of ecosystems. Earthworms make soil, bees pollinate flowering plants and salmon and whales play important roles moving phosphate around from deep sea waters to freshwater.
These species are in practical terms more valuable than humans, and if they are endangered, each individuals life is worth more.
Granting all humans equal rights is a political move and generally a good one, but it is an artificial one. Attempting to extend this man made idea to the whole of nature achieves nothing good whatsoever.
As a rule, if a pit bull attacks a serial paedophile we are supposed to kill the pit bull. I wouldn't mind one less pit bull in the world, and we could put the paedophile on trial afterwards. If I somehow had to choose between the life of an endangered whale and the life of a serial paedophile, I personally would save the whale and kill the paedophile, whatever the law said.