Dr George Carey told a congregation at Canterbury Cathedral that some good things had already emerged from the wreckage of the World Trade Center in New York.
But he warned that it would be a mistake to rely on emotion or collective grief to protect a civilised society.
The sermon has come at the end of a year which he said had reminded people that the world could be dangerous and unstable, and that shocking things could happen to innocent people.
Dr Carey quoted St John's account of the birth of Christ as a shining light which the darkness of the world had been unable to put out.
But he said St John's words were also troubling, suggesting there were times when darkness came close to overwhelming all else.
Dr Carey recalled the aftermath of the destruction of the World Trade Center in an area now known as Ground Zero.
Despair
He said: "Friends who were caught up in the devastation of the twin towers describe how vast clouds of smoke and dust billowed towards them, suddenly engulfing them in a choking, blinding darkness.
"These clouds have dispersed, but for many they have left a greater darkness, which no lighthouse beam has graciously penetrated."
Dr Carey said the birth of Christ in Bethlehem had also been a kind of ground zero.
But it had spread waves of new hope and life over centuries, rather than the destruction and despair that radiated from New York in a matter of seconds.
Dr Carey quoted WB Yeats' poem The Second Coming, which he said served as a warning not to take a civilised society for granted.
He called for more passionate commitment to shared values, such as the equality, justice and tolerance rooted in Christianity.
And he said only through strong support for such values would a better world be built.