What does James 2:12 mean?
In the previous few verses, James made the point that anyone who stumbles in obeying any command in the law is, by definition, a lawbreaker. He is equally as guilty as if he had broken every command in the law. James's point wasn't that we're all doomed to experience God's eternal wrath in hell. James agrees with Paul (Romans 3:23–24) that, solely through faith in Christ, we find forgiveness from all of our sins. Nothing in his letter contradicts that truth.Rather, James is urging us to carry with us an awareness that we are lawbreakers. We must acknowledge the fact that we are sinners. Perhaps some of his readers believed themselves to be superior to other Christians. Maybe that's why they tended to show favoritism to the wealthy. They may have believed themselves to be more spiritual, or closer to God, because of their relatively "better" obedience to the law.
James says that attitude is wrong. All Christians are equally guilty of sin: none are perfect. All of us are fully depending on God's mercy to save us. Our good works are not what make us righteous in the eyes of God. We should treat each other as if that is true. We should speak and act as those who will, in fact, experience God's judgment.
However, God will not judge those who trust in Christ under the absolute standards of the Old Testament Law. Instead, He will judge us under the standards of the law of liberty, or the law that gives freedom. In Christ, forgiven from our sin, we are free to obey the God who loves us and shows us mercy. We must speak and act toward each other as people also in need of great mercy from God, fellow sinners forgiven by the blood of Christ. In that humility, we are very unlikely to show favoritism based on the world's standards.