What does Psalm 27:2 mean?
David expresses confidence that his enemies will not succeed. If they try to attack and destroy him, David is sure they will fail. In fact, he is certain they will fail. By identifying his foes as "evildoers," David indicates they are not just his enemies but God's enemies as well. It is certain, therefore, that they will stumble and fall.David lived out that level of assurance when he engaged Goliath in combat. Goliath thought he would give David's flesh to the birds and wild animals, but David told Goliath that the Lord would deliver him into his hand, and David would give the Philistines' dead bodies to the birds and wild animals (1 Samuel 17:44–46). The apostle John realized our enemies—Satan and his followers—want to destroy believers, but he encouraged us to rely on the Lord for victory. He wrote, "Little children, you are from God and have overcome them, for he who is in you is greater than he who is in [the evil world system]" (1 John 4:4).
Psalm 27:1–6 demonstrates David's confidence in the Lord. He trusts God will protect him from his enemies and restore him to Jerusalem, where he will offer sacrifices. Psalm 22:8–26 is a parallel passage. It's possible David wrote this psalm when he was in the Negev, as a fugitive from King Saul, or during the violent rebellion of his son, Absalom. In the second half of this psalm, David pleads with God for the very deliverance he seems assured of in the first half—demonstrating that "knowing" not to be afraid does not make a person immune to the emotion of fear.
David lays out the reasons he should be confident in God's protection. David then transitions, almost abruptly, into heartfelt pleas for God to rescue him from his enemies. The impression is that David is experiencing natural human anxiety and responding by reminding himself of God's goodness. The psalm ends with the same assurance expressed when it began.