Read Proverbs 14-16
The thoughts of the wicked are an abomination to the LORD: but the words of the pure are pleasant words. Proverbs 15:26
You know those mean, nasty thoughts that should never come out of your mouth? The Lord knows your thoughts as well as your heart. Even if they are never spoken, terrible things can roll around inside your head if not removed immediately.
An abomination is something extremely hated, even detested. God doesn't just wish we wouldn't think evil thoughts — He despises that line of thinking altogether. To the Lord, there is no difference between wishing evil on someone and deciding to ignore someone because they said or did something. It is all hated.
We are to change those evil thoughts into pure and pleasant words. This change comes from our very heart, changing the attitude we use to view the world around us. The words we do allow to come out will be useful and uplifting, worthy of God's love and approval.
There is no benefit whatsoever to wicked thoughts — to the thinker, to the one being thought of and definitely not to God. But the beautiful, loving words inspired by God and given to a pure heart are beneficial to all who receive them.