Dr. Yusuf Al-Qaradawi, whom John Esposito of Georgetown University famously called “a reformist” explains the ins and outs of the Islamic view on apostasy in this article from Islamonline:
The greatest kind of danger that faces Muslims is that which threatens their moral aspect of existence, i.e., their belief. That is why apostasy from Islam is regarded as one of the most dangerous threats to the Muslim community. The ugliest intrigue the enemies of Islam have plotted against Islam has been to try to lure its followers away from it; they have even used force for this purpose. In this regard, Almighty Allah says, [And they will not cease from fighting against you till they have made you renegades from your religion, if they can.] (Al-Baqarah 2:217)
In the contemporary age, the Muslim community has been exposed to horrendous invasions and aggressive attacks, one of which is the missionary invasion that aims at uprooting the Muslim community altogether. This invasion began its missions with the Western colonialism (of the Muslim world), and it still exercises its activities in the Muslim world and among the Muslim communities and minorities (in non-Muslim countries). One of its goals is to entice Muslims to convert to Christianity. This goal was made clear in the North American Conference on Muslim Evangelization (that was held in Colorado in 1978). Forty studies about Islam and Muslims and how to spread Christianity among them were submitted to that conference, and US$1 billion was allocated for this purpose. In addition, the Zwemer Institute (in South Carolina) was established to train missionaries to preach Christianity to Muslims…
Muslims are to seriously resist individual apostasy before it seriously intensifies and develops into a collective one.
That is why the Muslim jurists are unanimous that apostates must be punished, yet they differ as to determining the kind of punishment to be inflicted upon them. The majority of them, including the four main schools of jurisprudence (Hanafi, Maliki, Shafi`i, and Hanbali) as well as the other four schools of jurisprudence (the four Shiite schools of Az-Zaidiyyah, Al-Ithna-`ashriyyah, Al-Ja`fariyyah, and Az-Zaheriyyah) agree that apostates must be executed…
A bit on the longish side, but well worth the read for anyone still confused as to why it is forbidden for Muslims to express doubt about Islam. See also Ibn Warraq’s treatment, Leaving Islam.