Several verses in Psalm 4 are in the first person, for example in verse 1:
Answer me when I call, O God of my righteousness! You have given me relief when I was in distress. Be gracious to me and hear my prayer! ESV
At first sight it seems obvious that "I" refers to David, especially as the author is indicated:
To the choirmaster: with stringed instruments. A Psalm of David.
However I'm worried I might be misunderstanding the genre - in a modern-day song, for example "Here I Am To Worship", "I" refers both to the author and the singer - it isn't sung solely in the sense of "Here Tim Hughes Is To Worship"!
Given the rest of the introduction to the psalm, should we consider David's intention to be for his people to understand themselves individually as the "I" they sing?
To the choirmaster: with stringed instruments. A Psalm of David.