The fundamental driving force behind the Iranian Revolution of 1979 was the rise of conservative positing of Islam in a modernist version of it. The Ayatollah was able to consolidate power in his argument that the regime of the Shah had corrupted Iran with his use of secret police, and an overall loss of focus on Islam in the nation. From abroad, the Ayatollah was able to have his message spread internally in Iran through underground channels that ended up fomenting in a full blown revolution and change in perception. The abdication of the Shah and the ascent of the Ayatollah helped to create a setting where a more traditionalist view of Islam in both government and society was adopted.
There's no simple way to answer that question, as there were multiple causes over a course of years that led up to the revolution.
First, Iran had long been the most westernized and secular country in the Middle East. It was a close ally of the West and the United States in particular. The Shah of Iran, Reza Pahlavi, had used the country's oil wealth and foreign aid to line his own pockets with hundreds of millions of dollars. This caused resentment among the general population.
Secondly, an ultra-conservative movement by Islamic clerics, led by the Ayatollah Khomeini, to turn back the clock and help Iran revert to a traditional Islamic state took hold in the anti-Shah atmosphere. It especially appealed to the young people in Iran. They began an armed resistance as early as 1971.
Lastly, as this movement grew and spread, the Shah knew only to crack down with his brutal police force, arrest hundreds of demonstrators and leaders, which only fanned the flames. Islamic revolutionary protestors turned out by the hundreds of thousands and eventually drove the Shah from power.
The long term effect of this was that Iran was alienated from all of the western countries, including the US. Personal freedoms, especially for women, were drastically reduced, the monarchy was destroyed and religious leaders took long term control of the country, and Islamic Sharia law became the new court system.
I believe you are referring to the overthrow of the rule of Shah of Iran in 1979, under the leadership of the Muslim Religious leader Ayatollah Ruhollah Khomeini, and establishment of Iran an Islamic republic country.
Shah of Iran, Mohammad Reza Pahalvi (1919-1980) became the ruler of Iran in 1941. As Shah he introduce many reforms in the country for economic as well as social development of the country. But he was not able to do much to improve the condition of the masses.
Further he ruled with dictatorial powers, crushing with force all opposition he faced. Although Iran had a parliament and a cabinet he controlled the government. Also Shah followed a non-conservative approach towards Islamic religion. This made him unpopular among many people. His opponents accused him of denying basic freedom to people, and ruining the economy of Iran with his spending and corruption in government. Many conservative Muslims in Iran accused him of violating teachings of Islam.
In late 1970's the various opponents of the Shah united under Ayatollah Khomeini, This led to development of the mass movement which forced Shah to leave Iran in January1979 after mass demonstrations, strikes and riots against his rule. His government was overthrown the next month. Khomeini took over the charge of the government and declared Iran an Islamic republic.
Ayatollah Khomeini set-up a government that claimed to be based on Islamic principles. He tried in revolutionary courts hundreds of officials in the Shah's government and put them to death by firing squads.