Psalm 34 provides a definite time when David wrote it, “when he pretended to be insane before Abimelech, causing the king to send him away.” This story can be found in 1 Samuel 21. Running from King Saul, David went to the Philistine city of Gath. When they discovered who he was (the hero who killed Goliath, who was from Gath), he pretended to be insane in order to not be killed by them. Constable notes that the structure of this psalm is an acrostic, with each verse (except the last) beginning with a successive letter of the Hebrew alphabet (except the sixth letter, which is skipped).
In Psalm 34:1-7 David told why he chose to praise God. Even in the midst of his situation, hiding in Gath from Saul, David remembered the things God had done for him in the past and chose to celebrate them, rather than becoming depressed. Psalm 34:6 is an especially poignant statement: “This oppressed man cried out and the LORD heard.” Many could tell the same story today.
Beginning in Psalm 34:8, David began to call on God’s people to follow his lead and worship the LORD with him. He asked them to “taste and see that the LORD is good” (vs. 8). To “taste” is to experience and to evaluate based on that experience. David was not asking for blind faith but for people to trust based on God’s past and present work on their behalf. David believed that those who were loyal to God would “lack nothing,” because God would care for them (Psalm 34:9-10).
Psalm 34:12 is a classic example of vision-casting: “Do you want to really live? Would you love to live a long, happy life?” (“Who is the man who desires life and loves length of days that he may see good?” NASB). Of course, the answer is “Who doesn’t?” David’s solution: “Turn away from evil…strive for peace” (Psalm 34:13-14). This is similar to commands in several of Paul’s letters (Romans 12:18; 1 Thessalonians 4:11-12; 1 Timothy 2:2).
Psalm 34:20 is worth noting, because it reappears in John 19:36. Whereas David claimed that God will protect godly people, using broken bones as a hyperbolic illustration, John quoted this verse as a Messianic prophecy that none of Messiah’s bones would literally be broken, which they were not, as God protected his Son. This psalm is a great reminder of God’s love and care for his people.