Hm... interesting stuff to think about in this thread!
Yesterday, one of my students complained to me that his mother keeps saying to him, "You're so big!" He's actually a very little guy for his age, compared to his peers, so this stings a bit. I pointed out to him that he's only been alive for 11 years. His mother, on the other hand, is 50 (or so he tells me). I said to him, "These 11 years are your whole life, so they seem like a very long time. But, for your mum, they're not that long at all. So, she's always surprised when she sees you, because to her, it seems like only yesterday when you were a toddler. To her, you're big. And you got big all at once, very suddenly."
I think optimism kind of works the same way.
In order to be optimistic, we have to imagine ourselves in the future. We have to be able to put ourselves there and think about it in a good way. Now, if we've only been alive for a little while, we've got a lot of future to imagine. If life has generally been good to us in this little while we've been alive, then we have little difficulty imagining that it'll be even better in the future.
However, this ability to mentally time travel has its downside, too. We can imagine disaster. Illness. Poverty. Death. The longer we've been alive, and the more troubles we've endured or seen our friends and family (or even strangers in the news) endure, the more pessimistic we become about our own future. And quite reasonably so. It's important to spot danger ahead of time, so we can try to work toward a future without troubles like these. Unfortunately for us, we're also smart enough to realize that some catastrophes are unavoidable and inevitable and coming closer with every passing year. ("Death!!" "Oh, Grandpa, you always say that!")
This is, of course, all mediated through our personality - some of us are naturally more optimistic than others.
And I think countries, as a whole, can be similar. When the US was young, it was natural to be optimistic about its future. Having less access to media also helped maintain a sense of unity and optimism, since people only knew what they read in the daily paper about their country. (Why do you think authoritarian regimes try to control the media?)
Personally, my theory is that the US is going through a rocky adolescence right now. This cynicism, self-loathing, antagonism and ennui is just a passing phase, and doesn't define it. Because, underneath there's still starry-eyed optimism, and a determination to change the world for the better.) Sooner or later, the country will make it to adulthood, settle down, and get comfortable with its identity.
(Canada is nearly the same age, but still living in Mom's basement - "It's just like having a real apartment!")