As far as I can tell from the history, it would be inaccurate to claim either that quantum theory originated completely as pure research or that it had its origins in applied science. To set the stage, there are basically three time periods involved:
1900-1913: Planck's paper on blackbody radiation (1900), Einstein's paper on the photoelectric effect (1905).
1913-1927: The old quantum theory, Bohr model, BKS theory.
1927: Within the space of about a year, a new quantum theory is produced, which is essentially the theory in its modern form.
Planck was working almost totally in his own theoretical world, and his work was considered extremely obscure at the time. He made his bread and butter as a theoretician at a university. (Claims that Planck was funded by lightbulb companies appear to have been false.) Although Einstein was a fairly competent experimentalist, inventor, and engineer, and worked for a while at the Swiss patent office, his work on quanta was way ahead of its time, and seems to have been pure research, unmotivated by any applications.
As we get into the Bohr era, quantum theory per se starts to take shape, and we see a vigorous interplay of theory and experiment, often with clear applications. Spectroscopy was rich in applications before, during, and after this period. For example, people were interested in determining the composition of gases from their spectra. Moseley's work on x-ray spectra and atomic number was carried out in close collaboration with Bohr, and it resulted in, for example, the discovery of hafnium. All of chemistry is one big application of quantum mechanics, and chemistry is rich in applications. Obviously the group centered on Bohr expected their work to have applications in chemistry and atomic and molecular physics, and it certainly did.
With the advent of modern quantum theory in 1927, we very quickly start to see applications. It was only 15 years from this time until the year when the first nuclear pile was operated (1942), and I have a hard time imagining nuclear power being developed without quantum mechanics.
The history of the transistor seems to more or less coincide with the period during which quantum mechanics was developed. The first patent was by Lilienfeld in 1925, but it seems to have taken a long time for progress to be made, mainly because people couldn't purify semiconductors well enough. Lilienfeld did a PhD in physics and had Planck as one of his thesis advisors. He started out as an academic physicist at Leipzig and then transitioned to working in industry in the US.
Some of the early work on quantum physics was carried out with funding from rich individuals rather than governments or universities. The Solvay Conferences were funded by the chemist and industrialist Solvay, and the important Stern-Gerlach experiment, carried out during difficult times in Germany as hyperinflation was getting going, was paid for by US banker Henry Goldman. I would say that these links are evidence of what seems like the typical situation regarding the links of quantum mechanics to applications. People like Solvay, a chemist, surely expected there to be applications, but the applications were not expected to be immediate and lucrative, which is why Goldman and Solvay saw themselves not as investors but as donors.