The texts of the individual psalms do not usually indicate who wrote them.1However some of the titles of the individual psalms do contain information about the writers.2This is the only really reliable information we have as to who composed these psalms, though the commentators have their theories.
Not all the titles contain information about authorship.3The ones that do refer to the following writers. Moses wrote Psalm 90.4David composed 73 psalms, mostly in the first two books of the Psalter (i.e., Pss. 1-72). Asaph wrote 12 (Pss. 50, 73-83). Korah's descendents were responsible for 10 (Pss. 42, 44-49, 84, 87-88). Solomon wrote one or two (127 and perhaps 72). Heman the Ezrahite wrote one (Ps. 88). Ethan the Ezrahite composed one (Ps. 89).
Of these the earliest would have been the one Moses wrote (Ps. 90) and it probably dates from about 1405 B.C. Those David composed would have originated between about 1020 and 975 B.C. Asaph was a contemporary of David so we can date his in approximately the same period. Solomon's psalm(s) seem to have been produced about 950 B.C. Korah's descendents as well as Heman and Ethan probably lived after Solomon, but exactly when we cannot identify. Since Heman and Ethan are connected with Ezra as Ezrahites it is probable that they lived and wrote after the Babylonian exile as he did.
We can date some of the psalms that do not contain information about their writers in the title, if they have a title, by their subject matter. For example, David seems to have written Psalms 2 and 33 even though his name does not occur in the superscriptions (cf. Acts 4:25). Likewise Psalms 126 and 137 must have been late compositions dating from the time the Jews returned from Babylonian exile or shortly after that.
Most of the Psalms, then, were written between 1000 and 450 B.C. The one by Moses was composed considerably earlier and a few may have been written later, but probably not much later, than 450 B.C.
There is some internal evidence in the Book of Psalms that the Jews collected the individual psalms and compiled them into groups in various stages and that this process took some time.5We would expect this because some psalms date hundreds of years after others. Psalm 72:20, for example, seems to mark the end of a collection of David's psalms that antedated the Psalter we now have, but which editors incorporated into the larger work. Psalm 1 appears intended to introduce this collection and, probably later, the entire Psalter. The writer of most of the first 72 psalms (Books 1 and 2 of our modern editions) was David.6Solomon (2 Chron. 5:11-14; 7:6; 9:11; Eccles. 2:8), Jehoshaphat (2 Chron. 20:21-22), and Jehoiada (2 Chron. 23:18) all organized temple singing and may have had a hand in compiling some of the psalms. Hezekiah (715-686 B.C.; 2 Kings 18-20; 2 Chron. 29-32), one of Judah's best kings and one who led his people in returning to Scripture, may have added to and organized part of the Psalter (cf. 2 Chron. 29:25-28, 30; 30:21; 31:2; Prov. 25:1). So may Josiah, another reforming king of Judah (640-609 B.C.; 2 Kings 22:1-23:30; 2 Chron. 34-35; cf. 2 Chron. 35:15, 25). The last two books (sections) of Psalms (chs. 90-106 and 107-150) contain more miscellaneous psalms dating from Moses to the return from exile. It seems likely that Ezra, the great renovator of postexilic Judaism, may have been responsible for adding these and perhaps putting the whole collection in its final form.
"The picture that emerges is a mixture of order and informality of arrangement, which invites but also defeats the attempt to account for every detail of its final form. There is some chronological progression, with David most in evidence in the first half, and a clear allusion to the captivity towards the close of Book V (Ps. 137). But David reappears in the next psalm (138), and by contrast, the fall of Jerusalem had been lamented as far back as Psalm 74."7
Each of the five books or major sections of the Psalter ends with a doxology, and Psalm 150 is a grand doxology for the whole collection. The earliest evidence of the five-fold division of the Book of Psalms comes from the Qumran scrolls, which scribes copied early in the first century A.D. Undoubtedly the Psalter was in its final form by the close of the Old Testament canon, namely by 400 B.C.