Meaning of the verses
The first verse commands us to call on Allah as "Malik al-Mulk" (Owner of Sovereignty), meaning He is the true Owner of every kingdom. He gives rule to whom He wills and takes it from whom He wills; He honours whom He wills and humiliates whom He wills. "Biyadika al-khayr" means all good is in His Hand, and He has power over all things. Ahl al-Sunnah affirm Allah's Hand as befits His majesty, without ta'wil (figurative reinterpretation) and without likening it to creation.
The second verse shows signs of this same power: He makes the night enter the day and the day enter the night, meaning the hours of night and day grow and shrink with the seasons; He brings the living out of the dead and the dead out of the living, like a plant from a seed and a believer from a disbeliever's offspring; and He gives provision without measure to whom He wills. Tafsir al-Sa'di says it hinted that Allah would take the empires of Caesar and Chosroes and give them to the Ummah of Muhammad ﷺ, and so it happened.
The dua for paying off debt
Anas (may Allah be pleased with him) reports that the Prophet ﷺ said to Mu'adh bin Jabal (may Allah be pleased with him): Shall I not teach you a dua so that, even if you had a debt as great as a mountain, Allah would have it paid off? He then taught him a dua that begins with this verse, followed by these words: "Rahman al-dunya wal-akhirah, tu'tihima man tasha'u wa tamna'u minhuma man tasha'u, irhamni rahmatan tughnini biha an rahmati man siwak" (Most Merciful of this world and the Hereafter, You give them to whom You will and withhold them from whom You will; have mercy on me with a mercy that makes me free of need of the mercy of anyone besides You). This report is in Imam al-Tabarani's Mu'jam al-Saghir; its chain has been graded sahih, and Imam al-Haythami also called its narrators trustworthy. This authentic report contains the words of the first verse (26) only.
So the correct view on the virtue of Qul Allahumma Malik al-Mulk is that it is part of a Sunnah dua taught for relief from debt. The dua should be recited with its full wording, together with the intention and effort to repay the debt, because making dua does not mean abandoning the means.
When and how to recite it
No authentic hadith mentions a special time, number or method for this dua. The practices popular among people of reciting it a set number of times, or for forty days, for provision, a job or power have no authentic evidence. Whenever debt is a worry, this dua can be made at any time of day or night with sincerity and certainty.
It is also widely said that Allah's Greatest Name (al-Ism al-A'zam) is in this verse. Hadith scholars judge that report to be fabricated, so it must not be attributed to the Prophet ﷺ. Likewise, the detailed story told about Mu'adh (may Allah be pleased with him) and his debt to a Jew has a very weak chain. The authentic report is the one quoted above from Anas (may Allah be pleased with him).
Key lessons
These verses teach that power, honour and wealth are not owned by any human; they are a trust from Allah. So one should not abandon the truth out of fear of a person in power or to flatter him. Honour lies in obeying Allah and disgrace in disobeying Him. In hard times a servant should first praise his Lord and then ask for his need, as this dua is arranged. This is a summary of the tafsir of Qul Allahumma Malik al-Mulk.