Need -- and having compassion for those in need -- is a moral consideration related to justice. It concerns our response to suffering and want. As with merit and culpability, need concerns equitable treatment, rather than equal treatment. That is, we give extra consideration to people who are suffering or needy.
We have an obligation to help others who are in need. This obligation is influenced by a variety of factors.
Different Kinds and Degrees of Need
For instance, severity and urgency play a role. The more severe someone's suffering (and, therefore, need) is, the greater a priority it is for us to aid them. In the emergency room, priority is given to those who are in greater pain or more likely to die without treatment.
Another factor is helplessness. A greater priority should be given to those who lack the ability to fulfill their own needs. For instance, an infant and I may both be hungry, but I'm an adult: I have the money and mobility to go to the store or the refrigerator to help myself. An infant, on the other hand, has no such ability. (And, left on their own, they may eat something that does more to harm them.) So, of the two of us, the infant deserves more actual help in the name of aiding the needy.
Still another factor has to do with one's culpability or responsibility for being in need. It's one thing if I can't pay my bills because a burglar has stolen all of my money; my need is then largely someone else's fault. But, suppose that, instead, I can't pay my bills because I've lost all my money gambling: I might need precisely the same amount of money (i.e., the severity of my need is the same), but my right to ask for assistance from others doesn't seem as strong, because it's really my own fault that my money is gone. I could have held on to it if I had behaved responsibly, rather than losing it in a game of chance.
It's clear how the above considerations make it difficult to come to clear judgments about how much we should give to whom:
Suppose you have two patients, one who is in excruciating pain -- but it is not a pain that will effect their long-term health or functioning -- and another patient, who is in only mild pain -- but who will lose an arm or lung if they do not get treatment right away. Who should you help first?
Suppose a family -- say, two parents, two children -- are destitute, and about to lose their house for lack of money. But, the reason they have no money is because the parents lost it all gambling. Should you give them any money? If you don't, the children suffer for the irresponsibility of their parents. If you do, you're shielding the parents from their failure to behave responsibly (worse, the parents may go on to gamble away the money you give them). What do you do?
Another: a drunk driver hits a child, and both are injured. The driver needs immediate attention, or he will die. The child needs immediate attention, or he will lose a limb, though he will not die. The driver's need is more severe, but the child is suffering through no fault of their own, whereas the driver was behaving irresponsibly. Supposing you can only help one, who do you help?
Another: suppose that an elderly driver hits a child, but this time it is purely an accident, and neither of them is at fault. Each needs immediate attention, or they will die. If you can only help one, which will it be?
This last example introduces still more considerations effecting our duty to render aid: each individual has a past history and future prospects for their own individual happiness, as well as a past history and future prospects for contributing to the happiness of others. The child hasn't had much of a chance to live life at all; the elderly driver has. The child also has more potential to be of service to others in the future; the elderly driver has less, given that they would die of old age soon. But, suppose the elderly driver is a gifted doctor whose research could help alleviate disease. Or, suppose the elderly driver is a philanthropist who has spent his life making sacrifices in order to help others. What if he says, "I've been making sacrifices all my life in order to help others, and all I want now is to live a couple more years of life. Haven't I earned that?" As a matter of merit, does he now deserve to live more than the child? But, then, the child hasn't lived long enough to contribute significantly to the lives of others, so is it a fair comparison?
I know that these situations appear artificial, but they are really not so different from what we face in real life. We have an obligation to help, but we simply can't help everyone. Therefore, the only way to treat everyone equally is to not help anyone at all, and that's a terrible conclusion to reach. We must help, but we're going to have to set priorities with respect to who we should help first, and whose needs can wait.
Unfortunately, the considerations that we appeal to in order to set these priorities -- severity, helplessness, culpability, past merits and future prospects (and maybe even more that I haven't mentioned) -- aren't straightforward. In fact, they may actually make it even tougher to sort things out.
So, while it's very easy to say "Help the needy!", it's far more difficult to say how we should do so, and who should get priority over who else.