The similarities and differences between the positions of each source are related to each author's view of the body politic (at least with regard to Hobbes and Locke). Both Hobbes and Locke start their most well-known political writings by discussing the state of nature, or the pre-political state of man.
Hobbes describes the state of nature as nasty, poor, solitary, brutish, and short. In the state of nature according to Hobbes, there are no rights which must be respected except for those which can be defended. The state of nature gives way to a political state because individuals who are victimized by the strongest individuals discover that they can protect themselves only in groups. These groups grow but require that members give up some of their freedom of action. Ultimately, the political community will select a ruler by common assent and give this ruler almost absolute control. The only things that man cannot be expected to cede to this ruler are his life and his freedom from confinement. Additionally, power cannot be recaptured from the sovereign without mortally wounding the state, making it immoral to disobey or to try to dismantle the sovereign. In Hobbes's view, the ruler has one, and only one, requirement. He (or she) must protect the lives and safety of the public. This means the sovereign must prevent invasions, punish those who engage in violence, and avoid unnecessary violence toward the public.
Locke has a somewhat rosier view of the state of nature, as he relies on a conception of natural laws which are essentially handed down from the creator. In the state of nature, Locke conceives of three rights which are derived from natural law: the rights to life, liberty, and property. In this state of nature, no person may morally strip a person of his life, liberty, or property. The ruler is, like Hobbes, chosen by mutual assent of the sovereign. However, Locke allows for the possibility that a ruler may be removed or deposed should he (or she) violate the natural rights of the citizenry. A sovereign must protect the property, life, and freedom of a citizen in order to remain a good ruler. To the extent that property is essential to maintaining life, the metrics for measuring the quality of a ruler are broadly similar between Hobbes and Locke. Both essentially conceive of a monarchy, though Hobbes favors an absolute monarchy, while Locke appears to favor a constitutional monarchy. The other main divide is that Locke believes that the people may remove their consent to be governed by the sovereign, while Hobbes believes this is not allowed.
In The Tempest , Prospero rules almost solely because he is powerful and knowledgeable. It is debatable whether Prospero would truly be considered a ruler under the ideas of Locke or Hobbes, since he acts more like the strongest man in the state of nature, compelling others to listen to him under threat of violence. He also uses his power solely for his own ends....
This would make him a poor ruler in the theories of either Locke or Hobbes.
Ultimately, all three writers agree that a good ruler must have power over their subjects. Locke and Hobbes agree that this power must initially come from the assent of the ruled, while Shakespeare may or may not agree with this sentiment, depending on whether Prospero is meant to be an explicitly poor ruler. The three individuals disagree as to when the ruled can reject the power of the ruler. Hobbes does not believe this is ever moral, Locke believes it is acceptable if the ruler violates natural law, and Shakespeare seems to show that one can reject the power of a ruler if they can find protection with a stronger ruler. Finally, Locke and Hobbes agree that the power of the ruler is meant to be used to protect the ruled, while Shakespeare may or may not agree, again, depending on the extent to which Prospero is meant to be an explicitly bad ruler.