I stated yesterday that while some have argued that this is referring to those who are "poor in spirit" based on the teaching of Jesus, I do not think that is what James is saying. I believe, based on the context, that James is clearly referring to the fact that God chooses those who are poor (materially) to be rich in the kingdom of God. One reason, I think, is that those who have attached wealth in this world often times (though not every time) place their faith and confidence in their money rather than Christ. This is a Biblical principle. You cannot serve God and money. You are not lay up for yourselves treasure on earth, but rather lay up treasures in heaven. Even Jesus said that it was hard for a rich man to enter the kingdom of heaven (after the rich young ruler walked away).
What is interesting about this passage is that in verses 8-13 James shows that we are all guilty of the law and then turns to focus on the gospel of mercy. The fact is no one has perfectly loved their neighbor as themselves. We have all fallen short of this command. And therefore, we are all guilty of sin (verse 8). We have all fallen into this sin based on the economic status of others. We have also fallen into this sin based on skin color, or living arrangements, or jobs, or a thousand of other things. We are all guilty. And God could judge us for that. However, as the last verse says, "Mercy triumphs over judgment."
I don't think this verse is in here just so that we would be better at how we perceive others. I think the point is that God's mercy, through the sacrifice of Jesus Christ, triumphs over judgment. If that is true of God, then how much more should it be true of us who are definitely not any better than anyone else? The point I made is that we must realize that when James sets us up as sinners based on the law of God, he is placing everyone on equal ground. Whether rich or poor, you have sinned before God. You and I are in need of a Savior. By God's grace, He sent His Son to bear the wrath of God because of our sin of partiality. He sent His Son to die that we might be made rich in Him (2 Corinthians 8:9). O how great is the mercy of God through Christ that triumphs over judgment for those who place their hope in the righteousness of Christ alone!