In The Lord of the Flies, it is pretty clear that there is some sort of war going on outside of the island (the dogfight that leads to the dead pilot, the naval ship that rescues the boys at the end, the evacuation of the boys). The vibe I got was that it was WW2. It wasn't explicit, but the book was published not long after the war (1954) and Golding fought in that war and just the overall tone seemed to fit.
It's admittedly been a little while since I read the book, but I don't think that we have to assume that it was nuclear. The book is quite explicit that there was some kind of war, and the implication from the end of the book (with the naval ship visible at the end) that it was brutal and in some way analogous to the war that took place on the island, but it never says (or, to my knowledge, implies) that it was nuclear; the story line could have just as easily applied to a conventional war.
For example, according to Wikipedia, Germany launched 1,402 V-2 rockets at the U.K., 1358 of which were launched at London. These missiles weren't especially accurate, but they were spectacular at intimidation; they could, as I understand it, fly above the cloud cover, so from the observers' perspective, they "appeared out of nowhere" with little warning and at seemingly arbitrary targets. (The fact that nearly 97% of them were launched at London gives you a sense of how extensively the city was targeted during WWII).
It was actually quite common to evacuate people (especially children) from populated areas, and that did actually appear in literature of the time. For comparison, in the Narnia series, The Lion, the Witch, and the Wardrobe is quite explicit about the fact that the Pevensies had been sent to the country to escape the bombing of London. There was never a nuclear bomb detonated in the U.K. (although the book was written after the nuclear bombing of Japan). Although this book was obviously written by a different author for a different audience, the point is that this kind of evacuation was hardly unique to Lord of the Flies, nor was it all that uncommon historically (especially in areas like London that experienced heavy bombing), nor do we have to assume that authors were referring to nuclear weapons. Conventional warfare was more than brutal enough to justify the evacuations.
I remember seeing an interview with the publisher back when I studied it in school. In the original draft first chapter outlined a nuclear war and was implied to be a bit over the top, most publishers hadn't gotten past it and refused the book on the basis of the first chapter thinking the book to be mainly about a nuclear war. This introduction was gotten rid of in later drafts. I saw your question because I thought of it randomly and wanted to see if there was a copy out there so I started googling.
I saw this on the Times of London website: Editor demanded cuts to ‘absurd’ Lord of the Flies
If "atomic bomb" could mean V-2 Rockets, then it could also mean catapult, or mustard gas, both of which, given even a short notice, might lead to an evacuation of the children. And, of course, children might be evacuated immediately after an atomic attack.
As pointed out, one atomic bomb does not make a nuclear war, but it does make one atomic bomb. Why would Golding even mention an atomic bomb, especially to an audience whose children were practicing "duck and cover" in their schools (doesn't work, by the way) and spending small fortunes on fallout shelters if he didn't want to evoke a deeply rooted fear?
There was also the idea floating around at the time as to how civilization would recover if huge portions of the population were to die, surely a notable theme in the novel. The USA had a stockpile of over 2000 weapons and the USSR had around 200 by 1955, (Norris, Robert; Hans M. Kristensen (July 1, 2010). "Global nuclear weapons inventories, 1945−2010". Bulletin of the Atomic Scientists. 66 (4): 77–83. Bibcode:2010BuAtS..66d..77N. doi:10.2968/066004008), both countries building their reserves fast from 1949 on. The dread of nuclear war was palpable; it is harldly likely that anyone reading this in 1955 would have envisioned a V-2 attack.