This is actually a two part question. The first question is “what does Matthew 25:31-46 actually mean”, and the second question is “Am I supposed to stop and help every pan-handler I see?” Let me address them both.
Part I: This section of scripture is prophetic and is very specifically a vision of the coming future judgment of all humankind. Here is the text:
31 “When the Son of Man comes in his glory, and all the angels with him, he will sit on his throne in heavenly glory. 32 All the nations will be gathered before him, and he will separate the people one from another as a shepherd separates the sheep from the goats. 33 He will put the sheep on his right and the goats on his left.
34 “Then the King will say to those on his right, ‘Come, you who are blessed by my Father; take your inheritance, the kingdom prepared for you since the creation of the world. 35 For I was hungry and you gave me something to eat, I was thirsty and you gave me something to drink, I was a stranger and you invited me in, 36 I needed clothes and you clothed me, I was sick and you looked after me, I was in prison and you came to visit me.’
37 “Then the righteous will answer him, ‘Lord, when did we see you hungry and feed you, or thirsty and give you something to drink? 38 When did we see you a stranger and invite you in, or needing clothes and clothe you? 39 When did we see you sick or in prison and go to visit you?’
40 “The King will reply, ‘I tell you the truth, whatever you did for one of the least of these brothers of mine, you did for me.’
41 “Then he will say to those on his left, ‘Depart from me, you who are cursed, into the eternal fire prepared for the devil and his angels. 42 For I was hungry and you gave me nothing to eat, I was thirsty and you gave me nothing to drink, 43 I was a stranger and you did not invite me in, I needed clothes and you did not clothe me, I was sick and in prison and you did not look after me.’
44 “They also will answer, ‘Lord, when did we see you hungry or thirsty or a stranger or needing clothes or sick or in prison, and did not help you?’
45 “He will reply, ‘I tell you the truth, whatever you did not do for one of the least of these, you did not do for me.’
46 “Then they will go away to eternal punishment, but the righteous to eternal life.”
Look at both verses 40 and 45. Verse 40 says the “least of these brothers of mine” and verse 45 mentions “the least of these”. This suggests that it is not just anyone who the righteous have helped while the others go ignored; it is other believers in need. So this verse is not a missions verse saying we should help every “pan-handler” as you say, but it is a statement that a Christian will be characterized as a person who seeks to meet the needs of other Christians. This teaching of love towards other believers is taught throughout scripture: John 13:34, 15:12, 20:17, Romans 12:10, 1 Corinthians 6:1-8, 8:1-13, Galatians 6:1-2, 1 Thessalonians 4:9, Hebrews 13:1, 1 Peter 1:22, 2:17, 3:8, 1 John 2:9-11, 3:17, and this is just a small portion of these types of verses! This type of love is very evident in other parts of the world where believers are persecuted. They truly love and care for each other in a way that is hard for us, as Americans, to understand.
Part II: While the passage of scripture in the question does not deal with the world at large, I think it’s important to address what the Bible has to say about this. The trajectory presented to us throughout scripture is one of kindness, hospitality, and respect. This is not just towards other believers but also toward strangers. There is a parable that Jesus taught that addresses this well but I want to give you multiple places to examine for yourself because this is so important.
Old Testament traditions went to great length to insure hospitality toward strangers. If a stranger were to show up in town, the custom was to invite them to dinner and to your home to spend the night. In John chapter four we are presented with a story about Jesus, a Rabbi, doing the unthinkable in his culture by speaking with a Samaritan woman. This person was both a Samaritan (an ethnic makeup that the Jews hated), and was a woman (at this time men, especially Rabbi’s, never had conversations with women—much less an adulterous one). The book of Acts is rich with encounters with strangers. Jesus said to treat others as we would want to be treated and in Matthew chapter 5 he says to put others before ourselves, to be salt and light and let the whole world see our good deeds. The great commission tells us to make disciples—this means we must engage with those in our life in such a way that moves them closer to (1) salvation and (2) and then towards Christian maturity. So we must engage those unbelievers around us to make this happen.
We must also look to those missionaries who have given their lives to reaching out to others with God’s love. Most I’ve talked with say they have to become recognized as good and honorable people in the community’s they serve before anyone would listen to them about matters of religion and faith. Look at what Paul says in Colossians chapter 4:5-6, “Be wise in the way you act toward outsiders; make the most of every opportunity. Let your conversation be always full of grace, seasoned with salt, so that you may know how to answer everyone.”
I think that the best case in the New Testament regarding your question is a parable that Jesus told in Luke 10:25-37. Here is the text:
On one occasion an expert in the law stood up to test Jesus. “Teacher,” he asked, “what must I do to inherit eternal life?” “What is written in the Law?” he replied. “How do you read it?” He answered: “‘Love the Lord your God with all your heart and with all your soul and with all your strength and with all your mind’ ; and, ‘Love your neighbor as yourself.’” “You have answered correctly,” Jesus replied. “Do this and you will live.” But he wanted to justify himself, so he asked Jesus, “And who is my neighbor?” In reply Jesus said: “A man was going down from Jerusalem to Jericho, when he fell into the hands of robbers. They stripped him of his clothes, beat him and went away, leaving him half dead. A priest happened to be going down the same road, and when he saw the man, he passed by on the other side. So too, a Levite, when he came to the place and saw him, passed by on the other side. But a Samaritan, as he traveled, came where the man was; and when he saw him, he took pity on him. He went to him and bandaged his wounds, pouring on oil and wine. Then he put the man on his own donkey, took him to an inn and took care of him. The next day he took out two silver coins and gave them to the innkeeper. ‘Look after him,’ he said, ‘and when I return, I will reimburse you for any extra expense you may have.’ “Which of these three do you think was a neighbor to the man who fell into the hands of robbers?” The expert in the law replied, “The one who had mercy on him.” Jesus told him, “Go and do likewise.”
Growing up in church, I often heard people use this parable to say that Believers should care for others. I think that is quite obvious here. But the main thrust of the parable is a stinging rebuke of the two religious elite Jews that passed by this man in great need. The man in need was a Samaritan, and as I said above the Jews despised the Samaritans. So with this rebuke, Jesus was making a point that we must reach out in kindness and love to those who are in need!!!
So I think it’s safe to say that while we are not commanded to help every panhandler we see, the Bible is crystal clear on our responsibility to reach out to others in love…God’s love. There are many different ways to do this and God has wired us all differently so we can help in the many facets of reaching out to others. In 1 Corinthians 3:6 Paul uses a metaphor of planting, watering, and harvesting. He says all are important and different people fulfill these tasks…everyone must do their part and it happens one act of kindness and love at a time.