When the Quran clarifies that no one can be forced to decide what faith he should accept, how can the punishment of death be justified for the one who leaves Islam after he was a Muslim?
Let me clarify two things. The Quran has neither stated that no one is going to be forced to change his faith nor has it mentioned that the punishment for apostasy (leaving faith after believing) is death.
The Quran does ask the prophet, alaihissalam, and his followers to not force people to believe in Islam. (88:22) It also says that God doesn’t force religious guidance into the hearts of humans. (2:256) However, it also says that if the people who receive the message of God directly from His messengers (Rusul) and they continue denying it, after the lapse of a stipulated deadline, they will be punished by being killed. (9: 5-6) The last possibility suggests that in case of the nation that receives God’s message directly from one of His messengers, since the message becomes very clear to them, there is no further freedom allowed to them. In other words, it would be more appropriate to claim that God allows freedom to choose faith to individuals when the question of the right faith is less than completely obvious. When God’s message clarifies itself most clearly through His messengers, since no confusion is left anymore, the choice of continuing to deny faith knowingly is not allowed to them beyond a deadline ascertained by God.
It was therefore a matter of survival for the polytheists of Makkah to enter Islam (pronounce shahadah) or else they had to face death. People of the book were, generally speaking, given the concession to survive as second rate citizens (lesser citizens) by paying Jizya (protection tax) for their survival. (9:29) This law was meant for all the contemporaries of the last messenger, alaihissalam, who were living in the Arabian Peninsula a vast majority of whom survived him after his death. Therefore, the clear instructions for them even after his death were that they should be killed if they turn their backs on Islam (become apostates).
No new prophet was to come for the later generations. And therefore the law that states that apostates should be killed wasn’t applicable to any other times. Now Muslims are going to preach to non-Muslims and likewise are going to be preached by them. Muslims cannot demand a one-sided right for others to convert but declare a complete censure on the possibility of their fellow believers to convert to the other side. It is their message, performance, and preaching skills against those of the others. If any such one-sided right of conversion shall be demanded, it will not only be against God’s law, it will also be blatantly unfair and a very important tool in the hands of the competitor faiths to preach against Islam.
And like the law of apostasy was applicable for the contemporary generation of the messenger because of the reasons mentioned above, likewise was the law of blasphemy. Both stem from the same logic. A person who blasphemes against the messenger declares openly that he doesn’t believe in him. He too was therefore considered eligible to be killed. It is therefore not surprising that we find a mention of neither of the punishments in the Quranic text. Both are pleaded to be proved Islamic on the basis of their mention in the hadith literature where they are found because hadith is a record of what happened during the prophet’s time, may God’s mercy be on him.