The words of James 5:1-6 are strong words, some of the strongest criticism of the rich in the entire Bible, and they are addressed at the rich for their oppression of the poor.
Now listen, you rich people, weep and wail because of the misery that is coming upon you. Your wealth has rotted, and moths have eaten your clothes. Your
gold and silver are corroded. Their corrosion will testify against you
and eat your flesh like fire. You have hoarded wealth in the last days. Look! The
wages you failed to pay the workmen who mowed your fields are crying
out against you. The cries of the harvesters have reached the ears of
the Lord Almighty. You have lived on earth in luxury and self-indulgence. You have fattened yourselves in the day of slaughter. You have condemned and murdered innocent men, who were not opposing you.
One of James’ themes is the brevity of riches and possessions. He brings it up in James 1:10-11: “But the one who is rich should take pride in his low position, because he will pass away like a wild flower. For
the sun rises with scorching heat and withers the plant; its blossom
falls and its beauty is destroyed. In the same way, the rich man will
fade away even while he goes about his business.” And he brings it up again in 4:13-17. A powerful way to critique oppression and indulgence and a life dedicated to money and possessions is to gain a powerful vision of the brevity of life and wealth.
The images James uses are images of destruction — wealth has rotted, clothing has been destroyed by moths, and your coins have corroded.
Again, in light of what James says about the wealthy in James 1 and James 2 and James 4–5, we are probably not to see here a warning to the wealthy follower of Jesus to recognize the brevity of life but of a powerful indictment against the oppressive wealthy whom James warns of impending judgment — his message is not a warning but an indictment.