The short answer: certainly not all of them. The identity of the composers of the entire Psalter, like most other questions of biblical authorship, is complex and possibly unknowable. Some 73 of the 150 psalms claim David’s authorship; a few of them are more likely to be by the historical king than others, in the view of most scholars. The Book of Psalms we have today is a compilation reflecting generations of liturgical songwriting—much like the centuries-long contributions to the hymnals we use at Mass today.
Let’s start with David. Was he a composer of psalms at all? The Bible tells us he was a shepherd, soldier, lover, and skilled player of stringed instruments. Not every musician writes their own music but in the cycle of stories about David (1 Samuel 16 through 1 Kings 2:11) he does chant a few songs: an elegy on the deaths of his troubled King Saul and friend Jonathan and another for his general Abner. Psalm 18 is also inserted into the text of 2 Samuel and attributed as “sung” by David.
We also know David danced freely and showed great interest in liturgical matters like the return of the Ark of the Covenant to Jerusalem and building a suitable Temple for the Lord. It’s conceivable that a man of his talents and interests might have written hymns for ritual use or at least commissioned some to be written. David’s patronage may have been enough to render him the godfather of the Book of Psalms.
Our present Book of Psalms has five divisions: Psalms 1-41; 42-72; 73-89; 90-106; and 107-150. The deliberate way these divisions and their ending doxologies parallel the five books of Moses makes scholars suspect they were imposed later when those books became available after the Babylonian exile; that includes the “footnote” after Psalm 72 that states: “The prayers of David ben Jesse are ended.”
Similarly, subtitles were later added to many psalms linking each one to an event in David’s life: Psalms 3, 7, 18, 34, 51, 52, 56-57, 59, 60, 63, and 142. Scholars view these subheadings as having little historical value. (If you’ve seen ABBA’s Mama Mia! or Across the Universe done with Beatles' tunes, you know that any group of songs can be arranged into a story with a bit of creativity.) Dating the psalms has proven rather hopeless. Psalm 29 may be the oldest, predating the monarchy of Israel. Others may be as late as the post-exilic period 500 years later.
• “From Lamentation to Jubilation: Praying the Psalms in Daily Life” by Jane Redmont
• “Praying the Psalms” by Lawrence S. Cunningham
• Psalms for Praying: An Invitation to Wholeness by Nan C. Merrill (Continuum, 2007)
• Praying the Psalms: Engaging Scripture and the Life of the Spirit, 2nd ed., by Walter Brueggemann (Cascade Books, 2007)