Though the debt is largely overlooked, Tolkien’s supreme literary achievement, “The Lord of the Rings,” owes a great deal to his experience at the Somme. Reaching the front shortly after the offensive began, Tolkien served for four months as a battalion signals officer with the 11th Lancashire Fusiliers in the Picardy region of France.
Using telephones, flares, signal lights, pigeons and runners, he maintained communications between the army staff directing the battles from the rear and the officers in the field. According to the British historian Martin Gilbert, who interviewed Tolkien decades later about his combat experience, he came under intense enemy fire. He had heard “the fearful cries of men who had been hit,” Gilbert wrote. “Tolkien and his signalers were always vulnerable.
In the rent earth of the Somme Valley, he laid the foundation of his epic trilogy.
I'm not sure that opening phrase, "though the debt is largely overlooked" is accurate. Many of those who've written about Tolkien have noted the influence of his WWI experiences. John Garth dedicated a book length study, Tolkien and the Great War: The Threshold of Middle-earth, to that debt:
“To be caught in youth by 1914 was no less hideous an experience than in 1939 . . . by 1918 all but one of my close friends were dead.”
So J.R.R. Tolkien responded to critics who saw The Lord of the Rings as a reaction to the Second World War. Tolkien and the Great War tells for the first time the full story of how he embarked on the creation of Middle-earth in his youth as the world around him was plunged into catastrophe. This biography reveals the horror and heroism that he experienced as a signals officer in the Battle of the Somme and introduces the circle of friends who spurred his mythology into life. It shows how, after two of these brilliant young men were killed, Tolkien pursued the dream they had all shared by launching his epic of good and evil.
This is the first substantially new biography of Tolkien since 1977, meticulously researched and distilled from his personal wartime papers and a multitude of other sources.
John Garth argues that the foundation of tragic experience in the First World War is the key to Middle-earth's enduring power. Tolkien used his mythic imagination not to escape from reality but to reflect and transform the cataclysm of his generation. While his contemporaries surrendered to disillusionment, he kept enchantment alive, reshaping an entire literary tradition into a form that resonates to this day.
The author of the NYT piece has his own book to sell, that also addresses the impact of the Great War on C.S. Lewis:
The untold story of how the First World War shaped the lives, faith, and writings of J. R. R. Tolkien and C. S. Lewis
The First World War laid waste to a continent and permanently altered the political and religious landscape of the West. For a generation of men and women, it brought the end of innocence—and the end of faith. Yet for J. R. R. Tolkien and C. S. Lewis, the Great War deepened their spiritual quest. Both men served as soldiers on the Western Front, survived the trenches, and used the experience of that conflict to ignite their Christian imagination. Had there been no Great War, there would have been no [The] Hobbit, no [The] Lord of the Rings, no Narnia, and perhaps no conversion to Christianity by C. S. Lewis.
Unlike a generation of young writers who lost faith in the God of the Bible, Tolkien and Lewis produced epic stories infused with the themes of guilt and grace, sorrow and consolation. Giving an unabashedly Christian vision of hope in a world tortured by doubt and disillusionment, the two writers created works that changed the course of literature and shaped the faith of millions. This is the first book to explore their work in light of the spiritual crisis sparked by the conflict.