Psalm 119, also known as the Alfa-Beta, is my favorite Psalm. It is a moving tribute to the beauty of the mitsvot and the enthralling experience of Torah study. Boasting 176 verses, Psalm 119 also happens to be the longest chapter in the entire Bible.
Despite its inspiring content and exquisite form, Psalm 119 is one of the "orphan psalms"; in other words, unlike many other chapters in the Book of Psalms that begin with phrases like "A Song of David", the author of Psalm 119 did not incorporate his name into the text of the chapter.
The Rabbis of the Talmud and Midrash, followed by Rashi and Radaq, maintain that Psalm 119 was composed by King David. This should come as no surprise, since there are other instances of "orphan psalms" that we know were penned by David (take, for example, Psalm 105, and the commentaries there).
By contrast, Ibn Ezra (as well as many modern scholars, some of whom are cited in Daat Miqra's commentary to the chapter) suggests that this Psalm may actually have been written by an unknown individual who lived during the Babylonian Exile. Some even attribute the Psalm to Ezra the Scribe.
Because of my partiality to Psalm 119, I have long been intrigued by the question of its authorship. I would like to offer what I believe are compelling pieces of evidence in support of the traditional position that King David was, in fact, responsible for Psalm 119:
1) The structure of the Psalm, in which the first letters of the verses follow an alphabetical acrostic, is found only in psalms explicitly attributed to King David.
2) Throughout the Book of Psalms, only King David refers to himself (or is referred to) as "Your servant" when addressing Hashem. This phraseology appears in Psalm 119 several times.
3) The phrase "Pneh elai v'honeni" - turn to me and show me favor - is found only in Psalms composed by David, and appears in Psalm 119.
4) Only in Psalms by King David are the commandments referred to as "pekudim"; this terminology is employed in Psalm 119 as well. (There is one exception to this rule, Psalm 111, but it is also an "orphan psalm" that shows signs of being the work of King David.)
5) The author of Psalm 119 states that noblemen sit around and talk about him, and that he speaks of Hashem's testimonies in the presence of kings. This certainly indicates that the Psalmist was not a commoner, but a king, i.e., David.
6) The themes of Psalm 119 bear a striking resemblance to the words of King David in Psalm 19, "The Torah of Hashem is perfect, restoring the soul, the testimony of Hashem is trustworthy, making the simpleton wise, etc., etc." They are also reminiscent of Psalm 18, ""For I guarded the ways of Hashem, and did not commit evil before my God; For all of His laws are before me, and His statutes I shall not remove from myself." Also compare Psalm 25, "Hashem, make known to me Your ways, teach me Your paths. Lead me in Your truth and teach me, for You are the God of my salvation." And Psalm 86, "Teach me, Hashem, Your ways; I shall walk in Your truth; unify my heart to fear Your name." I am sure that there are more examples of this motif that are not coming to mind right now. However, these sentiments do seem to be uniquely Davidic in nature.
7) Psalm 119 uses the phrase "Ger Anochi Baaretz" ("I am a stranger in the land"). This kind of expression appears only one other time in Psalms - namely, in Psalm 39, which is openly attributed to King David. The same is true regarding "Shiviti Mishpatecha", a phrase in Psalm 119 that closely resembles "Shiviti Hashem L'negdi Tamid" found in Psalm 16. Examples like this are simply too numerous to list here.
8) Psalm 119 describes experiences of suffering - being unjustly pursued, etc. - that are strongly reminiscent of the travails of King David as characterized elsewhere in Psalms and in Nach.
Considered together, these observations seem to provide a very strong (if not incontrovertible) argument in favor of the traditional view that King David was the author of Psalm 119.