The naval officer has two major functions in the story: a representative of the adult world and a representative of the world war that is engulfing the outside world.
This novel is primarily a coming of age story. At the end of the story the once happy-go-lucky Ralph weeps for the "end of innocence." A coming of age story almost by necessity must include a representative from the adult world. The first representation is the dead man with a parachute, who instead of creating order, creates more chaos. The second is the naval officer who presumably rescues the boys from their own destruction. He sees the savages as little boys, and ironically teases them about playing war. He scolds them by telling them that as English boys they should have done better. The events that the boys have been involved in sharply contrast the officer's perspective of them as children who play together.
Yet, it is a no coincidence that the man who rescues the boys is an officer of war. Throughout the novel, Golding reminds us that the adults are faring no better than the children on the island,. The conflicts, violence, savagery on the island make it a microcosm for the world at large. The adults are not "sitting down and having tea." They are engaged in their own war, and the military uniform of the naval officer is a reminder of that. The officer's eyes rest on the cruiser in the ocean. Will it be the boys' rescue or their entry to another war--even more devastating that the one on the island? Are they truly rescued? Is order really restored?
The naval officer symbolizes plenty of things: First, it is a paternal figure which the boys desperately need. Second, it is a figure of authority and salvation, which the kids are also desperately in need of. Third, it is the first contact the boys have with the outside world. Fourth, it is a figure of discipline, order, and organization- those are the very things that the boys lost when they were left to their own devices. Fifth, he represents reality. Even the Naval Officer himself was a bit grossed out at the state of the children, and the children did not respond to him in a child-like or infantile way: Instead, everyone was shocked in both sides, and that is the same way reality hits- shockingly at times.
Finally, the naval officer represents salvation and a return to humankind. The boys had been living in a semi primitive state. How interesting that it is a NAVAL officer, one who commands the ocean (a very uncertain element) appears to re-organize and save the boys. Yet, naval officers equally follow nature's signs, and use objects to guide them through the most unreliable elements, and make it. Therefore, the naval officer is the ultimate salvation to the boys.