To be completely accurate, there is no exact date that is given as the context of the novel. However, we can make a few deductions. If we do this, World War II makes the most sense.
First, there was a war going on. The parachutist who fell from the sky was a war victim in a plane fight. Also there is the detail that Ralph’s father was a commander in the navy.
Second, there is mention of the Atomic bomb, which was used in World War II. Here is what Piggy says:
Piggy shook his head, put on his flashing glasses and looked down at Ralph.
“Not them. Didn’t you hear what the pilot said? About the atom bomb? They’re all dead.”
Third, at the end of the novel a soldier in a crisp uniform found the boys. When we also add the fact that William Golding served in the Royal Navy and served in the battle of Normandy, World War II is our best guess.