The 150 psalms in our single contemporary Book of Psalms were historically five books. They were collected and compiled by various people in different times and contexts.
The Book of Psalms is the most diverse book of the Bible. The psalms were written by many authors over about a 1,000 year span. They cover many themes and had many different original historical contexts when they were first composed.
What unifies the psalms are their genre, their primary emphases, and their usage. All of the psalms are poems that have been set to music. We don't know much about their original music, but the people of God have continuously set the psalms to music. This speaks to their historical and contemporary use by God's people as worship songs. The psalms also have and continue to be used as the prayers of the people of God.
The primary theme of the Book of Psalms is worship. The LORD is worth of praise because of who He is, what He has done, and what He has promised to do. Most of the psalms are personal in their worship of the Lord.
The secondary theme of the Book of Psalms is praise. They reflect a heartfelt desire to see His plan fulfilled and His glory shine. Often psalms lift up the name of God within difficult circumstances, illustrating the psalmist's confidence in the Lord's power to overcome all obstacles.