In the Flamingo Modern Classic edition of Fahrenheit 451 published in 1993, Bradbury wrote a detailed introduction to the novel detailing the origins of the story. In brief it started with a short story called "Bonfire" which he tried (unsuccessfully) to sell to various magazines. Themes from this story were reworked in a later story called "Bright Phoenix", then again in a story called "The Exiles" and then in "Usher II" which appears in The Martian Chronicles. There are many themes of fire, book burning, censorship, authoritarian oppression and intellectual repression present in all these stories. These themes are common in many of Bradbury's stories, considering the age in which he had his childhood/adolescence: basically post World War II/McCarthyism, when description/discussion of the Nazi regime and its methods of controlling thought and idea would have been common, and suspicion of your neighbour as a communist was widespread; it becomes easy to see a common thread. To go back to the words Bradbury put down regarding the origins of Fahrenheit 451, he very specifically discusses a late-night encounter with a passing police patrol and the suspicions of wrong doing directed toward him that lead to the writing of a story called "The Pedestrian", which can be considered as the root story that lead directly to Fahrenheit 451 in the aforementioned introduction. There is also acceptable information in the Wikipedia page about Fahrenheit 451.
Fahrenheit 451 developed out of a series of ideas Bradbury had visited in previously written stories. For many years, he tended to single out "The Pedestrian" in interviews and lectures as sort of a proto-Fahrenheit 451. In the Preface of his 2006 anthology Match to Flame: The Fictional Paths to Fahrenheit 451, he states that this is an oversimplification. The full genealogy of Fahrenheit 451 given in Match to Flame is involved. The following covers the most salient aspects.
Between 1947 and 1948, Bradbury wrote the short story "Bright Phoenix" (not published until the May 1963 issue of The Magazine of Fantasy & Science Fiction) about a librarian who confronts a book-burning "Chief Censor" named Jonathan Barnes.
In late 1949, Bradbury was stopped and questioned by a police officer while walking late one night. When asked "What are you doing?", Bradbury wisecracked, "Putting one foot in front of another." This incident inspired Bradbury to write the 1951 short story "The Pedestrian".
In "The Pedestrian", Leonard Mead is harassed and detained by the city's remotely operated police cruiser (there's only one) for taking nighttime walks, something that has become extremely rare in this future-based setting: everybody else stays inside and watches television ("viewing screens"). Alone and without an alibi, Mead is taken to the "Psychiatric Center for Research on Regressive Tendencies" for his peculiar habit. Fahrenheit 451 would later echo this theme of an authoritarian society distracted by broadcast media.
Bradbury expanded the book-burning premise of "Bright Phoenix" and the totalitarian future of "The Pedestrian" into "The Fireman", a novella published in the February 1951 issue of Galaxy Science Fiction. "The Fireman" was written in the basement of UCLA's Powell Library on a typewriter that he rented for a fee of ten cents per half hour. The first draft was 25,000 words long and was completed in nine days.
Urged by a publisher at Ballantine Books to double the length of his story to make a novel, Bradbury returned to the same typing room and expanded his work into Fahrenheit 451, again taking just nine days. The fixup was published by Ballantine in 1953.
You can read the full Wikipedia article here.
In short, it seems to have been an ongoing dialog or commentary about how Bradbury potentially saw human society developing or falling into a trap/damaged state and the themes are recurrent in his work. They found the fullest and best articulated version in Fahrenheit 451.
To quote that introduction written by Bradbury:
"What caused my inspiration? There had to be a root system of influence, yes, that propelled me to dive head first into my type writer and come up dripping with hyperbole, metaphor, and similes about fire, print and papyrus.
Of course. There was Hitler torching books in Germany in 1934, rumours of Stalin and his match-people and tinderboxes. Plus long ago the witch hunts in Salem in 1680, where my ten-times-great grandmother Mary Bradbury was tried but escaped the burning. But then most of it was my romantic background in Roman, Greek and Egyptian mythology, starting at the age of three, Yes, three years old, three, when Tut was raised from his tomb and appeared in the weekend gazettes in all his gold panoply, and I wondered what he was and asked my folks.
So it was inevitable that I would hear or read about the triple burnings of the Alexandrian Library, two of which were accidental one on purpose. Knowing this at nine I wept. For, strange child that I was I was already an inhabitant of the high attics and haunted basements of Carnegie Library in Waukegan, Illinois".