I think what he meant is when people spend their lives in a reality that falls short of the good ole days, and public officials consistently fail to deliver on their promises, it is easy to become cynical about anyone or anything that carries with it the promise of a better future. Instead, people find scapegoats to blame for it all and then turn inward to God and tradition - the two most good and wholesome things in life to many of them that, no matter what happens, cannot be taken away.
Those who lack hope must fill in its place other things to cope.
Edit: Which in hindsight I suppose is a less thorough variation of what Lief explained!
but, the way Obama said it was that "clinging to religion" is bad. I wonder if Obama thought the lives Paul, Peter, and Jesus were examples of people who lived out their lives "clinging to religion"?
Well, "clinging" to anything is bad. However, there's believing in something because you honestly want to believe in something. Such beliefs developed in that way way should be encouraged, but such spiritual beliefs should not be considered the only way that one becomes altruistic and avoids a tendancy towards criminal behavior and moral turptitude. On the other hand, there is such thing as believeing in something because you are afraid of what happens if you do not believe in it or even simply believing in something because there is nothing left to beleive in. The President and anyone else have every right to be concerned with the two latter, especially the former of the latter. That doesn't mean that people who have developed their faith through those means should be discouraged from their faiths, but giving those people more to be thankful of is very admirable.