Tolkien was in the Somme offensive in 1916. He was a 2nd Lieutenant in the Lancashire Fusiliers. He took part in one of the many attacks on the Schwaben Redoubt, a heavily fortified strongpoint in the German line. There are two books about the war's impact on Tolkien's fiction: John Garth's Tolkien and the Great War: the Threshold of Middle Earth and Janet Brennan Croft's War and the Works of J. R. R. Tolkien.
Among the passages in Tolkien's work that seem to echo his WW1 experience is the Journey through the Dead Marshes in Lord of the Rings. Additionally, Lisa Jardine sees a reference to tanks (first used in WW1) in connection with Morgoth's iron dragons, which appeared in a story that Tolkien wrote during a leave of absence in 1916 or early 1917. The iron dragons were 'iron monsters in the likeness of dragons, which might cross difficult terrain and harbour legions of orcs to transport them safely across the open plain.'
In the comments for Jardine's piece, Rev. John Waddington-Feather recounts a story told by Michael Tolkien, according to which the Dark Riders were based on WW1 German Uhlans.
|WW1 German Uhlan. Will somebody get that horse a mask?!|
Understandably, the tale breeds skepticism, but it could be true. Strictly speaking, Uhlans didn't wear skull and crossbone badges, but British soldiers didn't speak so strictly. They referred to all German cavalry as uhlans, and there were at least three German cavalry units in WW1 that adorned their headgear with the macabre decoration. There were the 'Black Brunswickers', who formed the 17th Hussars Regiment, and two regiments of Life Hussars (more here and here). While there weren't large hussar units on the western front in 1916, several such units were dispersed in smaller groups among the infantry battalions all along the front. Moreover, while the steel helmet had already been introduced by 1916, some cavalry men retained their old skull-and-crossbones hats. As to the question of why Tolkien, a signaler, was riding a horse -- well, signalers had to lay and repair the wire along which their signals ran, and it's well within the bounds of possibility that one who had been tasked with such chores would borrow a horse. After all, if a chaplain such as Canon Scott could use a horse to get around, why couldn't signalers use horses, too?
Aaron Isaac Jackson published a good article about the War's influence on Tolkien's work. His focus is The Hobbit. Jackson says,
In The Hobbit Tolkien is explicit about what they [the goblins] represent, linking them expressly to the mechanized warfare that characterized the First World War: ‘It is not unlikely' [quoting Tolkien] 'that they ... invented some of the machines that have since troubled the world, especially the ingenious devices for killing large numbers of people at once, for wheels and engines and explosions always delighted them’. (Aaron Isaac Jackson, 'Authoring the Century: J. R. R. Tolkien, the Great War and Modernism', English, 59 , pp. 44–69, at p. 61)Jackson notes that as Bilbo and his company approach Smaug's lair, '‘Neither bush nor tree, and only broken and blackened stumps to speak of ones long vanished’ greet their approach, echoing the destruction by war of the green farmlands of France.' (Ibid., pp. 61-2)
|The Schwaben Redoubt by William Orpen (1917) -- the desolation of Smaug?|
|Chateau Wood, Ypres (1917)|