So if I understand it correctly earlier absolute monarchs claimed to be ordained by God, or granted permission to rule by the pope. Or maybe were personally rich and had an army.
How did people like Wilhelm II and Czar Nicolas II justify how much power they had over a country past an age of enlightenment when many other prominent countries had democracies? Was their main argument that their fathers lines were Emperors/Kings?
In Russia there was the enduring image of the paternal Autocrat which said that the Czar was the father of the Russian peasantry, the only man strong enough to control the estates who vied for influence and power but which were necessary for the running of the empire. Without the wisdom and strength of the Imperial family the provincial squires and the bureaucrats in the cities would destroy the social system on which they all relied in order to make themselves unjustly richer. He was chosen by God to watch over the Russian people and keep their way of life safe.
Whenever there was a problem it was the fault of the middle and upper classes, and when it was fixed it was the Tsar's inspired intervention.
This myth was the central pillar of the 19th and 20th century empire's ideology of faith, autocracy, and nationalism. The Tsar protected the rights of the church in exchange for their support, protected the rights of the various social estates (the squires, the nobility, the burgess, the peasants) in exchange for their support, and he protected the rights of the Great Russians while guaranteeing somewhat the other peoples of the empire (especially the Cossacks on which they so often relied).
It's important to stress that this wasn't a fiction generated for propaganda purposes. At least, it wasn't a fiction consciously generated by the Romanovs to strengthen their rule. It was the genuine belief of the late 19th and early 20th century government that they had been chosen by god to fulfill this role. This lead to a certain blindness to the very real changes that Russia was undergoing and great ineffectiveness as they tried to take charge of things of which they had little understanding. Reformers which could have saved the monarchy were ousted as threats to the autocracy, without the realisation that the real threat was the nature of the system itself.
Similarly this myth was also wholeheartedly believed by the peasant classes and much of the landed gentry/squires. The Russian village was essentially a commune of sorts where the patriachs held supreme power over the weaker families and were often very powerful on a local level. These patriarchs were often just as powerful as the local squire could be, and the two relied on an investment in the current system which was protected and encouraged by the Tsarist Autocracy. Even in the last years of the regime, peasants who left the village to gain an education and who took advantage of the land enclosure schemes set up by the government were shunned by their village as traitors to the Tsar and the peasant classes. Even in the 1920s there were letters recieved by the Soviet government congratulating Lenin on being chosen to join the Tsar's cabinet of ministers. So strong was the belief in his incorrigible right to rule that the news of his deposing was thought ridiculous.
The ultimate downfall of the system is very complicated and I can't even begin to answer why in a satisfactory way, but a very major factor was the urbanisation and education of the population which reduced their reliance on traditional power structures and subsistance farming, and increased their political sensitivity and investment in the international economy.
My main source for this is The People's Tragedy by Orlando Figes.
The preeminent post-divine-right theory of Kingly power is Thomas Hobbes' 'Leviathan' which was published in 1651 in England. Hobbes articulates what has come to be called 'social contract theory' which, very basically, suggests that people all got together when the nation was founded to invest all their power in one authority, generally a monarch, out of self interest. Hobbes' work is largely based on his imagining of a pre governmental state of nature in which there are no laws and every man is out for his own self interest. This, colored by the English civil war Hobbes lived through, is a terrible place full of violence where nobody is capable of any sort of industry. "No arts; no letters; no society; and which is worst of all, continual fear, and danger of violent death: and the life of man, solitary, poor, nasty, brutish and short."
In a very small nutshell, his argument is that life is so terrible without a government that government needs to be as strong as it possibly can be and that, while there may be abuses of such absolute power, they cannot be worse than the chaos and violence of no government or a government unable to control its people.