Simply put, a Theocracy is any society in which The Church is the government. Often the laws of a theocracy are based off religious law, or claims that God (or Gods) is the supreme ruler of their state. The temporal ruler is probably the Priest King or High Priest. This is especially prevalent in pre-modern settings.
It's common to have an official state religion, but this doesn't necessarily equate to a theocracy or even an especially religious country. For example, in England the head of state (the monarch) is also the head of the Church, bringing an overtly religious aspect into the governmental system, but England and the UK in terms of population are much less religious than nearby, officially secular Ireland and France.
Note that true theocracies, where secular government is virtually non-existent, are fairly rare. Most often the Church will simply have a lot of secular power and sometimes a parallel government: authority over religious/moral laws, its own bureaucracy, its own army, etc.
Compare Church Militant, where the clergy is Badass, but not necessarily the rulers of a country. A Corrupt Church is often the head of a Theocracy, but not always. See also God Emperor, where the rulers go one step further to proclaim themselves living gods with a personal religion.
Not to be confused with the Christian Rock band Theocracy.
In the DC Comics miniseries World of Krypton it's shown how the government of Krypton came to be science based. There were three competing factions: one for science, one for democracy, and one for a Theocracy. They decided to let the Kryptonian gods decide. One representative from each faction went out into a thunderstorm with a rod; whichever one didn't get hit by a bolt would be the chosen. Science won after theocracy and democracy's reps each got hit. In The Stinger of the story the scientist admitted to a time-travelling Kal-El that he had used a non-ferrous metal in making his rod. He didn't consider it cheating since the gods told him to do so - or so he claimed.
In Cube Zero, the omniscient dictatorship controlling the Cube is strongly implied to be a theocracy. "Crimes against country and God" is a notable transgression and anyone who survives the Cube is asked whether they believe in God — if they answer "No" they are incinerated. No one has ever anwered "Yes".
In Escape from L.A., the President Evil turns the United States into a virtual theocracy. He makes Christianity mandatory country-wide and religious heterodoxy punishable by death, while enforcing a set of new moral laws for the 'new America'.
In Donald Kingsbury's Courtship Rite, the overclans are all priest clans, ruling by religious right. Basically, the whole world is a theocracy, although given the harsh conditions of survival on Geta, a fairly pragmatic and not-very-hierarchical one.
David Eddings has two examples in The Elenium. The first is the city of Chyrellos which is more or less an expy of the real life Vatican example below, an independent city state ruled by the head of the church and run by church officials of a much larger religion. And despite not having a distinct homeland and only a single city to call their own, the Styrics probably also count since their highest body, capable of making decisions for all Styrics regardless of where they reside, is composed of the High Priests and Priestesses of the Younger Gods of Styricum.
The Temple Lands in David Weber's Safehold series is one disguised by a very flimsy legal fiction. Technically they are ruled by the Knights of the Temple Lands but every single member of that groups happens to be a member of the church hierarchy and church groups are used to enforce their rule, so it is a de facto if not de jure Theocracy.
Warbreaker has a less antagonist version. Hallandren is ruled by the Court of Gods and their priests; though there's certainly corruption to go around and the gods themselves can be rather out of touch with the world, they're not really any better or worse than most governments. The God King himself is actually quite a decent guy, if a powerless figurehead, and his High Priest, though he initially appears to be the Big Bad is actually a Well-Intentioned Extremist opposed to the real villains.
Inverted in The Stormlight Archive. Vorinism is the dominant religion of the nations the protagonists come from, but its priests (called ardents) have next to no political power and are kept staunchly under the thumb of the aristocracy and are even denied personal property to make sure they don't try to extend their influence beyond spiritual matters. This is because the Vorin nations were a theocracy (called the Hierocracy) centuries ago, and it was supposedly extremely corrupt- when the nobles seized power back, they wanted to make sure the Hierocracy would never return.
In Parable of the Talents, the U.S. is on its way to becoming a theocracy. The Glorious Leader, Jarrett, is a member of the Christian America sect which blames all non-Christian "heathens" (and sometimes Christians of other denominations) for America's problems. They have significant power over the country, with their own army and POW camps.
The Yuuzhan Vong from the New Jedi Order are essentially this, with religion being the driving force of their society and their leader revered as something between Priest King and God Emperor. Though the priests are only one of the four higher castes, Nom Anor (who knows a thing or two about how governments work, since his job is to subvert them) explicitly notes that their influence is the only thing keeping the other three (warriors, shapers, and intendents) from turning on each other.
Played with on Grayson. Religion infuses Grayson society and law, but Grayson's church no longer holds official power, and the right of the individual to follow their own path is actually a core element of modern Grayson theology.
The Millennial Kingdom government in the Left Behind books, which consists of God as ultimate ruler, Jesus as the ruler of the world, King David as the ruler of Israel, and the apostles as the rulers of the twelve tribes of Israel. It's surprisingly the most benevolent theocracy that existed, as God and Jesus Christ did not forbid freedom of speech or freedom of religion, allowing those who would not become believers in Christ to live either as unbelievers or as members of the Other Light for only 100 years before they die and are sent to Hell.
According to The Bible, the country of Israel was originally a nation ruled solely by God, with judges as His representatives. It was only until the nation of Israel wanted an actual king that Saul was crowned one.
In the Archangel Protocol, access to the LINK (the virtual reality implanted internet) is reserved for members of a religion. And since the LINK is required for operating in society... Every government in the world (except for Russia) has a state religion, and citizenship is conditional on being religious. Essentially, the atheists got the blame for World War III, and this is the result.
The ginormous Imperium of Man is very much a theocracy, given that they have a Physical God as its former leader. However, ever since a prominent Ecclesiarchy member went mad and tried to form his own Imperium within the Imperium, the Ecclesiarchy is no longer allowed to keep "men under arms". Hence theSistersofBattle. Also, their priests accompany the Imperial Guard into battle wielding inspiring speeches and eight-foot-long chainswords.
Similarly, on the Chaos side the leaders tend to be those who the gods most favor. However, they aren't really priests, as the Chaos gods would much rather their followers kill loyalists and aliens instead of holding masses.
The Lizardmen of Warhammer are led by their Skink priests, who interpret the wills of their gods.
The Theocracy of the Pale in the Greyhawk setting. In the Living Greyhawk campaign, the real-world region assigned to it was Utah.
Thrane of Eberron, ruled by the Church of the Silver Flame.
Until the Time of Troubles, Mulhorand and Unther in the Forgotten Realms setting were ruled directly by avatars of the Mulhorandi and Untheric pantheons (by Word of God, the actual Egyptian and Babylonian gods), and the countries functioned as theocracies with the priesthood also forming the bureaucracy. Mulhorand continued to be one after the avatars were allowed to return to their home plane, but Unther collapsed after all its gods were killed, had already left (the avatars could leave before being allowed to, but due to the circumstances of why they were there it would cut them off from Toril and their worshippers there) or had ended up dropping out of the Untheric pantheon into the FaerŻnic pantheon.
Morrowind in The Elder Scrolls was once ruled directly by its three Physical Gods, and even though the games are set in a time after The Empire forced a secular government on them, they still maintain a lot of power. By the end of The Elder Scrolls III: Morrowind, a minimum of two of the Tribunal are dead—Sotha Sil by Almalexia's hand, and Almalexia and potentially Vivec by the player's—and regardless of whether you killed him, Vivec disappears from his city in the interim between Morrowind and Oblivion.
The Paranid Empire in the X-Universe are ruled by one Priest-Emperor Xaar, and each Paranid settlement or station by a priest-duke. Their (rather bizarre) religion permeates every aspect of Paranid life, making Holier Than Thou the species' hat.
For most of the humans in Spira, the world of Final Fantasy X, the only government is also the only (apparent) religious institution, the Church of Yevon.
In Guild Wars: Prophecies the Charr invasion of Kryta led to the complete collapse and disappearance of the previous monarchy. The White Mantle took their place in stopping the invasion and then ruling Kryta once peace was restored. They were eventually deposed when a legitimate heir was found to challenge the increasingly corrupt and exploitative actions of the Mantle.
Also discussed. Monomachus suggests drumming up religious fervor to turn the entire thing into a war of religion to solve their manpower shortage, with the people of Hispania warshipping Asharte and the Ba'al gods fighting against The Empire who worship Watos. Despite frequently voicing her desire for followers, Tart says she will not go along with the plan, as people so forced and/or brainwashed are not true believers. Hamil agrees, and decides to form The Alliance to solve their manpower shortage.
In BioShock Infinite, Columbia is run by a theocracy with its state religion's prophet Zachary Comstock as the head of state. In an alternate timeline that Booker DeWitt travels through, Elizabeth takes over as the head of state, tortured into playing the role of the prophesied "Lamb" and eventually leading Columbia into an aerial assault of New York City circa 1984.
In The Gamers Alliance, the Godslayer takes over the kingdom of Aison after the Cataclysm and gathers a group of followers, the Grey Cult, which begin ruling the country in the Godslayer's name with the High Prophet as the Godslayer's spokesman.
Until the total unification of Italy in the 1870s, its predecessor the Papal States (at least in theory) served this role. How this exactly played out as well as its reputation depended on the time period, given how it's fostered both saintly figures and the likes of the Borgias.
The Islamic Republic of Iran is nominally a Muslim theocracy under the guidance of the Ayatollahs. In reality, it's a subject that's tad more complex. And very delicate.
A better example might be Afghanistan when it was under the control of the Taliban. They're such an infamous example that the word "Taliban" has entered the English lexicon as a negatively connotated term for anyone who seems to be in favor of a theocracy, especially an extremist one.
The Byzantine Empire is an odd example of sorts, in that the line between Church and State was very thin, with the Emperor having religious authority and influence rivaling the Patriarch of Constantinople.
Israel in both its' modern and classical incarnations has always had Judaism as a central aspect, both in the country's identity and its international policies. Having the idea of theocracy kicking around is inevitable when you bill yourself as "the Kingdom of God", but while classical Israel (and Judah) played this trope dead straight the modern one subverts, double subverts, or plays with it. It's always claimed to be the Jewish State or "Hebrew State", Judaism defines itself as both a nation and a religion, and during the classical period it was ruled as a monarchical theocracy based on an alliance between religious judges and the royal family. Today there are several religious political parties and various other snippets, like personal law (marriage, inheritance, divorce) is handled by religious courts relating to a person's background (Jewish, Muslim or Christian). However, most modern Zionists were nationalists and emphasized the ethnic aspect, the government is run as a democratic republic that has supremacy over religious law and can freely elect non-Jewish members. Including those from Muslim, Arab, and Christian parties, as well as normal parties whose platforms are decidedly not Old Testament.
The Massachusetts Bay Colony was founded on Puritan ideals, allowing no other denomination and permitting "visible saints" (righteous Puritans with sufficient property) only to vote or hold office.
When the Mormons first settled in the Salt Lake area, they established the short-lived State of Deseret, a theocratic state headed by Brigham Young. Following the Mexican American War, the area became part of the United States and the Utah Territory was founded in the region. The Utah Territory then spent some time being a de facto Mormon theocracy, with Young being the governor of the territory and the president of the LDS Church. In 1857, the U.S. government decided this wouldn't do and sent in federal troops to force the establishment of a secular, or at least non-Mormon, government. The last traces of official theocracy were eliminated when Utah became a state is 1896.
It's been argued that North Korea is basically a theocracy at this point, with the cult of personality surrounding the Kim family having mutated into a state religion. If you think this is an exaggeration, consider that people are encouraged to, and do, pray to Kim il-Sung and Kim Jong-il. Also, North Korean children are taught that Kim il-Sung performed miracles, such as turning sand into rice, turning fruits into bombs, and, yes, walking on water. He's also still the "Eternal President" despite being dead since 1994. It can almost be likened to a divine dinasty, down to Kim Jong-Nam, or a crude caricature of the Trinity.
This was the default state in monarchies for quite a while, even and perhaps especially in Europe (with a dubious long-running alternative being in the Germanies, due to the complicated political organization of the HRE). Of course, in practice it was more 'the Church is subordinated under the government', making it a sort of practical inversion (the Church became less of a parallel power structure that could work against the secular government) while formally playing it straighter.
The nation of Tibet was this from it's de facto independence in 1912 to the Chinese invasion in the '50s. The country was ruled by the Dalai Lama, and Buddhist clerics held the role of being Feudal Overlords over the peasantry. Today, the current Dalai Lama is still the head of the Tibetan government in exile.