Perhaps the easiest way to see David as a prophet is to survey one of his most clearly prophetic psalms, Psalm 22. Anyone familiar with the scourging and crucifixion of Jesus Christ can see the obvious parallels, and the writers of the gospel accounts—especially Matthew—bring them out through direct quotations of this psalm. Henry Halley, author of Halley's Bible Handbook, writes of this psalm, "[T]hough written a thousand years before Jesus, it is so vivid a description of the crucifixion of Jesus that one would think of the writer as being personally present at the Cross" (p. 254).
No one knows what event of David's life, if any, provides the background to his plaintive song, but it must have been the nadir of his sufferings, the most likely guess being sometime during Saul's pursuit of him. However, even if it is based on David's experience of persecution, Psalm 22 is so specific and detailed in its descriptions of Christ's crucifixion that it can in reality only be a divinely inspired prophecy of the execution of the Son of God—a full millennium before the events took place in Roman Jerusalem.
Richard T. Ritenbaugh
David the Prophet
Other Forerunner Commentary entries containing Psalms 22:22: