Praise be to Allah.
A person describing himself or someone else as deserving something may be understood in two ways:
The first possibility:
The one who says such words says it by way of objecting to the fact that Allah did not decree for that person what he was hoping for of a job, marriage and the like.
Undoubtedly saying such words with this meaning is a grave error, because it is attributing injustice to Allah, may He be exalted, or suggesting that He does not possess knowledge or wisdom – exalted be Allah far above that. Allah, may He be exalted, says (interpretation of the meaning):
“Indeed, Allah does not wrong the people at all, but it is the people who are wronging themselves”
The Muslim should watch himself and guard against saying anything that reflects objection to the decree of Allah, may He be exalted, or thinking that he deserves everything that he wants but Allah decreed that he should not get it, and thus he thinks negatively of Allah, may He be exalted.
Ibn al-Qayyim (may Allah be pleased with him) said:
Most people – in fact all of them, except those whom Allah wills – think negatively of Allah on an unjustifiable basis, for most people think that they are unfairly treated and are unlucky, and that they deserve more than Allah has given them. Thus the individual is implicitly saying: My Lord has wronged me and has withheld from me what I deserve. And he affirms that in his mind and objects to it in his words, but he does not have the courage to say it bluntly. Whoever examines himself and looks deep into what is hidden in his mind and his thoughts will see that this tendency is latent in him, like the fire in a smouldering ember.
So let the smart person who cares for himself pay attention to this issue, and let him repent to Allah, may He be exalted, and seek forgiveness constantly for thinking negatively of his Lord. Instead, let him think negatively of himself, for his nafs is the source and fount of all evil, to which ignorance and wrongdoing are second nature. So it is more appropriate for him to think negatively of his nafs than of the Most Just of Judges, the Most Wise, the Self-Sufficient, the Most Praiseworthy, Who is completely independent of means, to whom belongs perfect praise and perfect wisdom, Who is far above all evil in His Essence, His attributes, His actions and His names. His Essence is absolutely perfect in all aspects, as are His attributes and His actions. All of them are wisdom, purposeful, mercy and justice, and all His names are beautiful.
End quote from Zaad al-Ma‘aad (3/211).
The second possibility:
That the Muslim does not say such words objecting to the decree of Allah, may He be exalted; rather he says it speaking of reality. Thus he testifies that he himself or someone else deserves a particular job, based on what he has of qualifications and experience that make him suited for that job.
There is nothing wrong with this, if it is true and he is not just saying that to be nice to someone, because the fact that lying is haraam is well known. It is also not permissible for him to testify to that of which he has no knowledge. Allah, may He be exalted, says (interpretation of the meaning):
“And do not pursue that of which you have no knowledge. Indeed, the hearing, the sight and the heart - about all those [one] will be questioned”
And Allah knows best.