The central verb that is used here in many translations for the word hate
is sana’.
This Hebrew word has a broad semantic field in the Bible. It can mean to hate
(Proverbs 13:24) or it can even mean emotional enmity
(Deuteronomy 19:4). In Psalm 139:21–22, we should specifically think of keeping a complete distance from
and having a heartfelt aversion toward.
The author wants, in no way whatsoever, to be around those people who do not care at all for God and his commandments. He abhors their abominable practices. (Compare Psalm 26:5, Psalm 31:6, Psalm 101:2–4, Psalm 119:53, Psalm 119:104, Psalm 119:113, Psalm 119:128). He wants nothing to do with them.
John Calvin rightly notes in his commentary on this verse: It is a proof of our having a fervent zeal for God when we have the magnanimity to declare irreconcilable war with the wicked and them who hate God, rather than court their favor at the expense of alienating the divine layout. We are to observe, however, that the hatred of which the Psalmist speaks is directed to the sins rather than the persons of the wicked. We are, so far as lies in us, to study peace with all men; we are to seek the good of all, and, if possible, they are to be reclaimed by kindness and good offices: only so far as they are enemies to God we must strenuously confront their resentment.
This view of the passage also fits well with the command in the New Testament to pray for our enemies (Acts 7:60; Luke 23:34).
21 Do I not hate those who hate you, O LORD? And do I not loathe those who rise up against you?