Psalm 17:3, In the night. That is, in times of trials, afflictions and difficulties. During times of adversity, YHVH tests us by viewing our reactions to this difficulties, and to determine the true state and contents of our heart. The true mettle of a person, that is, the contents of their heart is revealed only during times of duress and when things are not going well. The question is this: when tested, will we walk in the Spirit and manifest the fruit of the Spirit or react carnally and manifest the works of the flesh (Gal 5:16–26)? These times of darkness and testing that befall each of us from time to time is often referred to as “the dark night of the soul”; they either make or break us. Jacob encountered such a time when he wrestled with the Messenger of Elohim in Genesis 32 and came out a changed man with a new spiritual identity. Yeshua went through a similar experience in the Garden of Gethsemane just prior to his crucifixion.
Psalm 17:4, The destroyer. This can be taken as a reference to Satan who comes to kill, steal and destroy. The Hebrew word for destroyer is pereets and taken in context with its verbal root means “one who destroys by dividing violently and then robbing, that is, one who divides and conquers.” The tactics of this enemy and his human minions have never changed from then until now.
Psalm 17:8, Apple of your eye. In Hebrew, this verse literally reads “Guard [Heb. shamar] me like the little man or the pupil daughter [Heb. bat] of the eye.” Apple is the Hebrew word ‘ıyshôn literally meaning “little man of the eye [according to Gesenius and The Artscroll Tanach Series Tehilim/Psalms Commentary] or pupil.” This is because when one looks at another person, the image of a little person is visible on the pupil like a reflection in a mirror. Eye is the generic Hebrew word ayin. The idea of the little man in the eye is beautiful and poetic imagery that captures the desires of the psalmist that the Creator would keep his image in his eye (i.e. the Big “Man” or Elohim is keeping the little man or the saint in is eyesight) continually or that Elohim would guard him as he goes through life as a father does his own daughter.
The expression “the apple of his eye” is now an English idiom meaning “to view a person favorably, to care deeply for them and to cherish them in one’s heart.”
This same expression is also found in Deuteronomy 32:10 where YHVH views the people of Israel as the apple of his eye. Although Elohim loves the whole world in a generic sense (John 3:16), and desires that every person be saved (1 Tim 2:4; 2 Pet 3:9), he refers to no other people but Israel as the apple of his eye.
It can also be presumed (as Matthew Henry notes) that Elohim will tenderly keep or protect those as the apple of his eye who keep or guard his commandments as the apple of their eye (Prov 7:2). That is to say, when we obey YHVH’s commandments, we automatically put ourselves under his protection or under the shadow of his wings as Psalm 17:8 suggests (see also Ps 91:4 and Matt 23:37).
Psalm 17:14–15, Men of the world…When I awake. Here the psalmist juxtaposes those who make material achievements their chief goal in life as opposed to those who seek first the kingdom of Elohim and his righteousness. The former have their reward in the physical life, while the latter have a greater reward to come in the next life when they awaken from death in the likeness of Elohim as possessors of immortality.
Belly…hidden treasure. The belly here is a reference to the womb, and hidden treasure literally means “that which is hidden, covered over or protected.” This is a clear reference to babies in the womb, which are a treasured gift that heaven gives to both the wicked and to the righteous alike. Those who murder their children through abortion or neglect or abandon these little divinely granted treasures are literally spurning or rejecting Elohim’s gift to them—a grave affront to the Almighty and his generosity to be sure!
Psalm 17:15, When I awake. This is one of the most notable passages in the Tanakh proving the validity of the concept of the resurrection of the righteous dead. Here David expresses his faith in the hope of the dead saints to eternal glory in the Presence of YHVH’s in his eternal kingdom. Corollary scriptures to this include Ps 16:10–11 and 1 John 3:1–3.