The Silmarillion by J. R. R. Tolkien is not a unified narrative but rather an edited collection of Tolkien's notes, prepared for publication by his son Christopher. The collection of notes shows the depth and detail in which Tolkien worked out the prehistory and mythology of the world in which he set his novels The Lord of the Rings and The Hobbit. The materials in the book cover a period of several thousand years, and focus primarily on the decline of the elves and rise of the humans in Tolkien's mythic kingdom.
Historically, John Ronald Reuel Tolkien was born on January 3, 1892 in South Africa. His father died when he was four, and his mother moved back to Birmingham and converted to Roman Catholicism. Although his mother died when he was 12, Tolkien remained a devout Roman Catholic throughout his life, and that theological background is especially evident in the character of Melkor, who very much resembles Milton's Lucifer.
The second important element of cultural context is World War I, in which Tolkien fought and was wounded. He actually started the stories of the Silmarillion while recuperating from his wartime injuries. Many of his descriptions of battles and their aftermaths were based on his personal experience of war.
Finally, much of the underlying mythos is based on Tolkien's own background as student and then professor of medieval studies. Both the created languages and some of the plot elements are based on Norse mythology and Nordic medieval culture.