These are in order of precedence; I wouldn't advocate ignoring number one while practicing number three.
1. Welfare: How great is a sentient agent or agents' capacity for pain? What forces are they being subjected to that cause them to suffer? Will making them feel better cause more suffering elsewhere, per the law of opportunity cost?
2. Social utility: Do they know how to build bridges? Can they send probes into space to preempt imminent asteroid impacts?
3. Personal utility: How can they benefit us -- emotionally, socially, etc.?
4. Overall competence: Even if they're of great social value, do they have good values themselves? Are their heads filled with nonsense? While we may see some utilitarian benefit in allowing them to do their jobs or fulfill one of our personal/psychological desires, are they still promoting bad ideas in their personal lives? Are they bad at understanding complex information? Are they bad at understanding simple information?
1. should determine how to treat someone in the sense of not impinging on his personal space or causing him harm; it's how we were initially granted the so-called "rights" mentioned in the Constitution (which, by the way, are far too absolute, and rarely take context into account per the "social contract" -- a contract that should exist but is in serious need of an upgrade).
2. should determine, after we've determined that hurting someone isn't a good idea (or is, if you think it is), whether it's a good idea to allow him to try his hand at various trades that could increase the overall well-being of society as a collective.
3. should determine whether a person can help us in some way, like by serving some kind of emotional use, even if we don't necessarily think he is "good," with good ideals. Note that 2. and 3. must come after welfare, but aren't in any particular order themselves.
4. should determine, after we've figured out the others, whether someone is worth truly befriending, working alongside, respecting, etc.
Only the brightest, most aware, and most productive are worthy of 4.; anyone can be worthy of 3., because everyone has something that someone else probably wants on a purely psychological or emotional level (or social level, as in the case of being able to give a recommendation); most people are worthy of 2., even if they're not currently realizing their full potential by working at bureaucratic institutions; everyone to have ever lived is worthy of 1.