We're never explicitly told, but by mathematical necessity1, it must have been World War II.
Frank Bryce's Age
Goblet of Fire opens in July 1994, and we're told that Frank is closing on 77:
Frank was nearing his seventy-seventh birthday now, very deaf, his bad leg stiffer than ever, but could be seen pottering around the flower beds in fine weather, even though the weeds were starting to creep up on him, try as he might to suppress them.
Goblet of Fire Chapter 1: "The Riddle House"
So he must have been born before July or August 19172. He'd have been 23 in 1939, when Parliament passed the National Service (Armed Forces) Act 1939, which mandated military service for all male UK residents between the ages of 18 and 41. Even assuming Frank hadn't joined the military when he turned 18, he definitely would have joined then, and we all know what the British Armed Forces were doing in 1939.
This does not, however, preclude him from having participated in other conflicts after WW2; the Korean War, for example, while normally considered on America's list of wars, did have UK involvement, and ran from 1950 to 1953. Frank would have been 33 when the Korean War broke out, so he may have served there as well.
So let's take another angle.
The Riddle Murder
We're told that the Riddles (Tom Sr. and his parents) were killed about fifty years prior:
Fifty years before, at daybreak on a fine summer’s morning when the Riddle House had still been well kept and impressive, a maid had entered the drawing room to find all three Riddles dead.
Goblet of Fire Chapter 1: "The Riddle House"
Fifty years is a round number, which makes it hard to take at face value, but means that the Riddles were killed around the year 1944. But we can do slightly better than this, because we know that Voldemort committed the murder and framed his uncle Morfin for it, in his sixteenth year:
In the summer of his sixteenth year, [Voldemort] left the orphanage to which he returned annually and set off to find his Gaunt relatives.
[...]
Morfin could not remember anything from that point onward," said Dumbledore, gesturing Harry back into his seat. "When he awoke next morning, he was lying on the floor, quite alone. Marvolo's ring had gone.
"Meanwhile, in the village of Little Hangleton, a maid was running along the High Street, screaming that there were three bodies lying in the drawing room of the big house: Tom Riddle Senior and his mother and father.
Half-Blood Prince Chapter 17: "A Sluggish Memory"
Voldemort was born in 1926, so his sixteenth year was either 1942 or 19433. Since Frank was the prime (muggle) suspect of the murder, he must have left the military after 1939, but before 1943.
So, World War II.
1 I am aware of the irony of answering a Rowling question with the phrase "mathematical necessity"
2 Worth noting that this fact alone precludes "The War" from referring to World War I; Frank wouldn't have been a whole year old when the armistice was signed, and even the most virulent proponents of child soldiery would agree that's too young to fight
2 Your "sixteenth year" is the year in which you are fifteen, because in your first year you are zero years old. Voldemort is a bit of a complication here, because he was born on 31 December 1926; technically his first year is 1926, but the fact that his first year lasts only 24 hours somewhat violates the spirit of the idiom. Whether the murder took place in 1942 or 1943 depends on how Rowling interprets the idiom, but doesn't really matter for the purposes of this question.