The answer to this question surely must be subject to whoever is asking it. Some would say that every life - I'm assuming we're talking about human beings lives here - is valuable. Others, perhaps wiser still, would say that every human life is both meaningful and valuable. Others, evaluating things from a narrower, more egotistic view of the world, might say that only those who contribute to the common weal are leading a useful and meaningful life. All of it stems from opinion, and opinion is opinion - not the truth necessarily of how things really are.
I opt for view No2, that is that all human life is both meaningful (especially if one is learning something from living it) and valuable in as far as one never really knows what impact one's action are making on others at levels beyond our ken. People our ego thinking might deem unworthy might be contributing enormously to our own understanding and to the understanding of others...complicated, isn't it. But so is life.