As for a major sin for which the perpetrator is punished e.g. adultery, the execution of punishment itself is a requirement in the sense that if the penalty has been exercised and carried out on such a person, irrespective of whether or not he has repented, according to some jurists he cannot lead prayers. If the punishment (such as lashes) has not been carried out on him, for example no one has learned about his sin and he has repented and shown remorse for the sin which he has committed, he can be a prayer leader provided that he bears the other conditions which qualify him for prayer leadership.
In any case, the answer of the religious authorities and jurists to the above question is as under:
On the basis of obligatory precaution, a person who has been subjected to Islamic punishment should not be followed.
An answer given by His Eminence, Ayatollah Mahdi Hadavi Tehrani (may Allah grant him long life) is as under:
If the repentance is real and genuine, and the penitent acquires the trait of justice thereafter while he bears the rest of the qualities necessary for prayer leadership, there is no objection to him leading a prayer.
Link to Isteftaat Website
 Grand religious authorities such as Fazel Lankarani, Khoei, Tabrizi, Sistani, Zanjani, Saafi, Bahjat; Tawzih al-Masail (with annotations by Imam Khomeini) vol.1, p. 793 under issue No. 1459.