Here is a good book review of Robert A. Pape's Dying to Win: The Strategic Logic of Suicide Terrorism. Pape has done extensive research on suicide bombers and concluded that the main motivation is not poverty or religion but nationalism. (Note that Pape and I are using "nation" to refer to supra-tribal ethnic groups which share at least a common language and common political ambition to run its own government, not necessarily to existing or historical states). Pape shows that suicide terrorism springs from perceived or actual occupations of one national group by a different and democratically governed one: Sri Lanka and India of Tamil regions (the Tamil Tigers), perceived Western proxy governments of Sunni Arab countries (Al Qaeda), a Shiite government allied to the U.S. invaders of Sunni areas in Iraq (Sunni insurgency), Israel of the Palestinian occupied territories (Hamas), etc. The strategic logic (as I liberally interpret Pape's theory) is that the suicide bombers credibly signal policymakers in democratic governments that the the national group cares far more about the conflict than the occupiers do -- and therefore are willing to sacrifice far more and make life far more difficult for occupiers. Pape points out that (at the time of writing of the book) the most suicide bombers came not from Al Quaeda or any other arguably religious terrorist group, but from the Marxist-Leninist (and thus atheist) Tamil Tigers. It can of course be argued that Marxism itself is a kind of religion, but at least Paper debunks the shallow idea that afterlife promises a la the "seventy virgins" are a necessary motivation for suicidal terrorism. I'd add that suicide terrorism grows from cultures that de-emphasize individualism -- thus the lack of, for example, ethnically European suicide bombers, but the historical existence of Middle Eastern and Japanese suicide fighters which Pape describes. We individualists have not been able to understand suicide bombers; they just seemed inexplicably crazy. Pape's analysis is an excellent antidote to this ignorance.
The movie "Jesus Camp" shows a fundamentalist Christain group trying to inculcate in their children the idea that Christians should also be willing to make extreme sacrifices in the cause of Christian crusade against Islam. If the West insists on occupying non-individualist national groups (for example most of the nations subscribing to Islam or Marxism), something like this indeed probably is necessary to be successful. But Christianity, with its emphasis on the individual soul, and the rest of the Western tradition is far too individualist for this (and for other reasons, which far outweigh the terrorist problem, this is a very good thing).
The lesson for Western foreign policy? (1) don't occupy non-individualist regions -- the costs will be far more expensive then we can imagine -- although you'd think we would have already learned this from the Vietnam and current Iraqi experiences; and (2) if you already are in such an occupation, the basic choices of remaining or leaving are both very expensive -- the former because it continues to motivate extreme nationalist ire, and the latter because it encourages national groups elsewhere by showing that suicide terrorism succeeds in its objectives. It's like paying off a kidnapper, which frees the current hostages but makes future kidnappings more likely. Withdrawing from occupation removes a current source of ire but shows national groups elsewhere that suicide terrorism is the best way to achieve the objectives of otherwise powerless nationalities.
This Hobson's choice reinforces why a decision to occupy is so expensive in the first place. We are no longer in a situation in which it's our literate and culturally unified armed forces against their illiterate and culturally and politically divided tribe, as during the era of colonization. Instead it's our literate and unified nations against their literate and unified nations, the only big differences being our mere superiority on a traditional battlefield and their much higher motivation and collectivism, and thus their much higher willingness to sacrifice individuals for the cause of the large national group. Occupation of national regions that have not yet been thoroughly Westernized (or are not otherwise individualistic) is no longer a politically viable use of force in our world. If we wish to convert collectivist nations to Western democracy, individualism, Christianity, or whatever else we'd like to teach them, our best strategy is to just use our dominant Western economy and media to be, as Reagan put it, a "Shining City on a Hill". That's how we brought down the Marxist and nuclear-armed Soviet Union. Focus on defending our own freedoms instead of trying to impose them, set a good example, and let the collectivists peacefully come to realize the advantages of individualism.