Proverbs 12:2

A good man obtaineth favour of the LORD: but a man of wicked devices will he condemn.

A good person receives favor from the LORD. A person who devises evil comes under His condemnation. Piety is rewarded by God. Evil is punished by God.