Many old Iranians were Sunni Muslims. Even many of top Sunni scholars like Bukhari were Iranians. Also, most Arabs are Sunni Muslims.
What was the historical effects(s) that caused Iranians to convert to Shia Islam?
One of the recurring themes in history I find fascinating is the spread of sects. You'll often find that when a group wants to separate itself from a foreign power structure, it will embrace a fashionable heresy. For this reason, the old views generally are kept toward the religous culture's central seat of secular power, and the new ones become popular further away (but still relatively near). Further out than that, there's no danger of external authority intruding, so the new sect doesn't have as much appeal.
For example, when German tribes started taking over Roman territory during the early middle ages, they often made their countries officially Arian Christian (Arianisim embraced a slightly different view of the concept of the Trinity). This allowed them to eschew the Pope's authority, as well as Rome's.
A similar thing happened in the Muslim world with Shia. There the seat of secular/religious power was in Baghdad. Nearby Iran though is Persian (Indo-European), rather than Arab. When indigenous rulers wanted to separate themselves from Baghdad's (and by extension, Arab) authority, Shia Islam became much more attractive. Shia was also for a time the official religion in the western part of North Africa, when that area wanted to break away from Egypt.
According to Wikipedia it was the Alvids who started it:
They were descendants of the second Shi'a Imam (Imam Hasan ibn Ali) and brought Islam to the south Caspian Sea region of Iran. Their reign was ended when they were defeated by the Samanid empire in 928 AD.
According to this Wikipedia link Safavids were the ones who imposed it:
Although Shi'as have lived in Iran since the earliest days of Islam, and there was one Shi'a dynasty in part of Iran during the tenth and eleventh centuries, but according to Mortaza Motahhari the majority of Iranian scholars and masses remained Sunni till the time of the Safavids
Also according to this source:
By 1500 the Safavids had adopted the Shi'a branch of Islam and were eager to advance Shi'ism by military means. Safavid males used to wear red headgear. They had great devotion for their leader as a religious leader and perfect guide as well as a military chieftain, and they viewed their leaders position as rightly passed from father to son according to the Shi'a tradition. In the year 1500, Esma'il the thirteen-year-old son of a killed Safavid leader, Sheikh Heydar, set out to conquer territories and avenge death of his father. In January 1502, Esma'il defeated the army of Alvand Beig of Aq Qoyunlu, ruler of Azerbaijan, and seized Tabriz and made this city his capital. Safavids went on and conquered rest of Azerbaijan, Armenia and Khorasan; They became the strongest force in Iran, and their leader, Esma'il, now fifteen, was declared Shah (King) on 11 March 1502.
The Safavid dynasty, which continuously ruled Iran from 1501 to 1722, made Shi'a Islam the official state religion. Over this period most Iranians converted to Shi'a Islam.
Ismail I, the founder of the Safavid dynasty, made conversion mandatory.
The answer below is from a book of history, which I currently don't possess nor exactly know the name of (AFAIR, Imam Hussain and Iran, not sure though). I will try to cite relevant excerpt from it ASAP.
The Persians (before it was Iran) actually had developed an affinity towards Ali(as), that is one of the reason that the current Iran has high population of shiites.
Why the affinity?
It was more of a personal and self-respect thing.
When Umar attacked Persia and brought back prisoners of war, which included the daughter(s) of the back then king of Persia (Yazdigar III, if I am not wrong), they were brought to Mosque of Nabavi where Ali(as) was present too. There Umar ordered that the prisoners of the war, including the the daughter(s) of the king, be sold out as slaves. Ali(as) objected to it and said that this is against the rules/traditions of the Arabs and war. That is, the female household of the defeated king should be treated with due respect and be married to those of the same social status and class. Upon hearing this Umar had to recede his order.
News of such an happening reached the prisoners because of which they developed a liking towards Ali(as) as it was because of his objection they were saved from being sold out as slaves. And later, if I am not mistakened, the daughter(s) were asked to choose whoever they wished to marry amongst the Arab men, so Umme-Rubab(as), daughter of the king, choose to marry Hussain ibn Ali(as), which made him the son-in-law of the king of persian and hence the affinity and one of the plausible reasons of the high shiite influence and population.
Iran was majority Sunni before Safavids came to power and within a half-century, it became majority Shia. This was some 800 years after the Arab invasion and some 300 or so years after Arabs had any power in Iran.
Furthermore, the Safavids brought Arab Shia Ulemas giving them a great deal of power, and persecuted Iranian Ullemas who were mostly Sunni. So the idea that Shiasm in Iran was a reaction to counter Arab's and or their influence is a non-starter.
I am from the Sunni tribes in the southeast. Many of them had come to these regions to escape Safavid's force persecution. In many of these tribes, Nader Shah is their hero who put a stop to Safavid's extreme Anti-Sunni policies.
To give an alternate and manufactured reason other than persecution and forced wipe-out of sunnies in Iran by fanatical Safavids is offensive.
Refer to the following wiki pages https://en.wikipedia.org/wiki/Safavid_conversion_of_Iran_to_Shia_Islam#cite_note-14
Let's keep it simple and factual. Shia sect was forced upon Iranians by Safavids. With exception of those tribes outside of the reach of Safavids, there was little choice. It started with convert to the Shia sect or lose your privileges or even face hardship (even death), and eventually, it simply became advantageous to convert to Shiism.
The rationale, that Iranians had an affinity with Shia Imams or that adaptation of the Shia sect was somehow related to a desire to separate themselves (from Arabs) were manufactured after the fact. Outside of North Africa, Arabs during the 15th century had little to no power.
Shias in Iran in many respect view their conversion to Shia sect, the same way Indian/Pakistanis Muslims view their conversion to Islam. Both groups view it as something positive. Both groups have created a narrative that has a little historical basis. a narrative based on perception, and a way to connect their post-conversion history to pre-conversion without the unpleasant part of the conversion.