"Be angry and do not sin" (Ephesians 4:26). Is this even possible? Not if perfect, sinless anger is the requirement, since sin infects everything we think, say, and do.
But I don't think Paul had perfect, sinless anger in mind when he quoted King David from Psalm 4:4 to the Ephesians. Paul's point seems to be that not all anger Christians experience is rooted in the prideful, selfish soil of our sin nature.
There is a kind of anger that comes from our regenerate, Spirit-directed nature, even if it is unavoidably tainted by our indwelling sin as it passes through the defective filters of our minds and mouths. And because the Holy Spirit through David and Paul instructs us to "be angry," it means some things must make us righteously angry.
So what does righteous anger look like in a Christian?
What Is Righteous Anger?
First, let's ask: What is righteous anger?
Righteous anger is being angry at what makes God angry. And "righteous anger" is the right word order. Because God is not fundamentally angry. He is fundamentally righteous. God's anger is a byproduct of his righteousness.
God's righteousness is his being perfectly right in all his ways, all of his manifold perfections operating together in perfect proportion, consistency, and harmony. God is the very definition and standard of goodness (Mark 10:18). What God says (Hebrews 6:5) and what God does (Micah 6:8) are good because they are "righteous altogether" (Psalm 19:9) — they perfectly represent his comprehensive perfection.
So, what makes God angry is the perversion of his goodness; the turning wrong of what he made right. God calls this perversion evil. Evil twists and disfigures God's glory, vandalizing what is most valuable, and profaning what is most holy. Evil poisons and distorts reality, resulting in the destruction of joy for every creature that chooses the perversion over God's good.
God's righteousness demands his anger over such destructive perversion and that he mete out commensurate justice against those who commit such evil.
So our anger is righteous when we are angered over evil that profanes God's holiness and perverts his goodness.