These classifications are simply an aid to help their comprehension and understanding. As Luther says below, some often deal with more than one category and their classifications are not always "precise", but these 5 are the main topics covered within the Psalms. Out of these five, he sees "Thanksgiving" - the "Sefer Tehillim" - type of Psalms being those of "first rank". Concerning thanksgiving, the more I age and ponder what fixes, relieves and helps with the burdens of life, the more I appreciate and am convinced in the wisdom "Do not be anxious about anything, but in every situation, by prayer and petition, with thanksgiving, present your requests to God. And the peace of God, which transcends all understanding, will guard your hearts and your minds in Christ Jesus." (Phillipians 4:6-7)
Luther explains his five-fold classifications:
The entire Psalter may be treated in a five-fold fashion, that is, we may divide it into five groups.
First, some psalms prophesy. They speak, for example, of Christ and the Church or what will happen to the saints. This class includes all the psalms that contain promises and warnings - promises for the godly and warnings for the ungodly.
Second, there are psalms of instruction, which teach us what we should do and what we should avoid, in accordance with the Law of God. This class includes all the psalms that condemn human doctrines and praise the Word of God.
Third, there are psalms of comfort, which strengthen and comfort the saints in their troubles and sorrows but rebuke and terrify the tyrants. This class includes all the psalms that comfort, exhort, stimulate endurance, or rebuke the tyrants.
Fourth, are the psalms of prayer, in which we call on God, praying in all kinds of distress. To this class belong all the psalms that lament or mourn or cry out against our foes.
Fifth, are the psalms of thanks, in which God is praised and glorified for all His blessings and help. This class includes all the psalms that praise God for His works. These are the psalms of first rank, and for their sake the Psalter was created; therefore it is called in Hebrew Sefer Tehillim, that is, a praise book of book of thanksgiving.
We should understand that the psalms with all their verses, cannot always be classified so precisely and exactly into these groups. At times one psalm might contain two, three or even all five classifications, so that one psalm may belong in all five divisions, with prophecy, instruction, comfort, prayer and thanksgiving lying next to one another. However, it is the intention that the reader may understand that the Psalter deals with these five topics. The classifications are a help, so that we might more easily understand the Psalter, become adapted to it, and also be able to learn and keep it. (Reading the Psalms with Luther, pg. 14-15)