Not only war but preparations to war, military-related research had very large influence on the development of science and technology. Of the recent examples I mention GPS,
Internet, space exploration, not even speaking of nuclear energy. GPS and satellite navigation in general were originally developed for military purposes, and most importantly the research was financed by the military. Internet was developed by US military as a communication system which could withstand nuclear attack. Space exploration is a byproduct of the development of ballistic missiles.
As Gerald Edgar wrote, digital electronic computers were developed during WWII, but coding/decoding was not the only purpose. Other purposes were the nuclear bomb project, which involved enormous amount of computation, and the devices for control of anti-aircraft guns.
One can give very many examples from earlier history, beginning with Hellenistic Greece. (Tyrants of Syracuse employed people like Archimedes not because of their love of science: the main reason was their desire to develop advanced military technology).
Military considerations also have large influence on development of science education. Think of the French Grand Ecoles founded by Napoleon, or of a huge
boost in American science education after the launch of the first Soviet satellite.
One can conclude that military considerations is one of the MAIN driving forces
of development of applied science and technology.