And your Lord is most knowing of whoever is in the heavens and the earth. And We have made some of the prophets exceed others [in various ways], and to David We gave the book [of Psalms].
(Your Lord knows you best;) O mankind, meaning, He knows best who among you deserves to be guided and who does not deserve to be guided.
إِن يَشَأْ يَرْحَمْكُمْ
(if He wills, He will have mercy on you,) by helping you to obey Him and turn to Him.
أَوْ إِن يَشَأْ يُعَذِّبْكُمْ وَمَآ أَرْسَلْنَـكَ
(or if He wills, He will punish you. And We have not sent you) - O Muhammad -
عَلَيْهِمْ وَكِيلاً
(as a guardian over them.) meaning, `We have sent you as a warner, so whoever obeys you, will enter Paradise and whoever disobeys you, will enter Hell.'
That Zabur (the Psalms) has been mentioned particularly in the last sentence of verse 55: وَآتَيْنَا دَاوُودَ زَبُورًا ، (And We gave Dawud the Zabur) has been done, perhaps, because Zabur reports that the Holy Prophet ﷺ will be a ruler along with being a messenger and prophet. This is as it appears in the Qur'an: وَلَقَدْ كَتَبْنَا فِي الزَّبُورِ مِن بَعْدِ الذِّكْرِ أَنَّ الْأَرْضَ يَرِثُهَا عِبَادِيَ الصَّالِحُونَ (And We have already written in the Zabur, after the [ previous ] mention, that the land is inherited by My righteous servants - al-Anbiya', 21:105).
At this stage, Imam al-Baghawi says in his Tafsir that Zabur is a book of Allah revealed to Sayyidna Dawud (علیہ السلام) . It has one hundred and fifty surahs or chapters and all surahs are restricted to praises of Allah and prayers to Him. The areas of lawful and unlawful, obligations and limits have not been taken up there.
Tazkirul Quran
Maulana Wahiduddin KhanOn ayahs 55–57
When a preacher calls for the truth and his hearers pay no attention to him, then certainly the preacher becomes exasperated, especially when the truth is as clear as daylight. Sometimes, he is so irritated that he cannot but vent his anger on the addressees by saying that they are not going to receive God’s mercy. Such words as these do not befit a preacher. He does not have permission from God to utter such words. Conveying the message of truth is one thing and meting out the divine reward according to the response given to the call of truth, another. The first is the task of a preacher and the second, that of God. A preacher should never make the mistake of crossing the limits set for him by entering the sphere reserved for God. Similarly, it happens sometimes that the preacher and the addressees engage in arguments regarding which of their respective prophets is the superior one. The energies of each side are then spent on proving that their own prophet enjoys a higher status with God, with the result that the discussion, which should have been focused on the principles of the prophet’s message, is instead focused on personalities. This awakens in them feelings of prejudice and, as a result, places further obstacles in the path of the acceptance of the truth. Hence the explanation given in these verses that it is a matter pertaining to God as to what status He grants to His servants. What preachers have to do is avoid such heated discussions on irrelevant topics and convey the real message of truth to the people.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.