Do rainbows show spectral lines from the sun?
First you must understand how a (primary) rainbow is formed. Here is a summary with some details that are not in the linked article:
Whenever a beam of light encounters an air-water boundary, it is either reflected or refracted. To form a primary rainbow, we must first have enough small water droplets in the air, as these are close to spherical. Parallel light beams that reach such a water droplet must be refracted once as they enter, reflected off the inner surface of the droplet once, and refracted once more as they exit:
(image from the linked article)
There are 3 important points to note here:
Water droplets in the air are never perfectly spherical. That is one source of fuzziness.
Parallel beams entering the same water droplet can exit at different angles! This is the major reason why rainbows can never give sharp spectra even if you have perfectly spherical water droplets (say in outer space). Why then do we still see the rainbow? There are three reasons, which together result in the rainbow being seen roughly at 42°:
Different incident light beams will have different amount reflected/refracted. In particular, the bottommost incident beam (in the diagram) will mostly pass through without being reflected at the back of the droplet, and the topmost incident beam will mostly be reflected rather than enter the droplet.
The light beams emerging from the droplet after the above process are 'denser' along the so-called caustic ray, because the emergent angle does not vary monotonically with the distance of the incident beam from the central axis, and it reaches a maximum for the caustic ray, around which the emergent angle varies less.
The incident light beams further from the central axis undergo greater refraction, hence resulting in greater separation of different wavelengths. In contrast, the rainbow rays from incident beams close to the central axis largely overlap one another and wash out. (See this webpage for an image illustrating this.)
Light beams may encounter more than one droplet! This is another major reason why we cannot expect a sharp spectrum from a (natural) rainbow.
Even if we assume that the water droplet is a point, the light beams from the sun will not be perfectly parallel. In fact, the sun subtends an angle of about 0.5° to an observer on Earth, so this leads to roughly that same amount of spreading of the rainbow as compared to one generated by a point light source. Still, this is a much less significant effect than point 2.
(jkien's answer is incorrect but inexplicably has lots of upvotes.)
Unfortunately, rainbows produced by the Sun are blurred because the Sun is not a point source. The apparent diameter of the Sun is 0.5°, while the width of the rainbow spectrum is about 2°.
However, be patient and wait until the next bright supernova appears at the night sky. It should produce brighter rainbows than the Sun, with purer, saturated colors, and perhaps with the Fraunhofer lines of the supernova visible to the naked eye.
As you point out, a sufficiently sophisticated spectrum device will allow measurement of spectral lines in the spectrum of the Sun.
For instance (history of chemistry), the existence of the element Helium was first noticed by the fact that a spectrum of the Sun includes lines not accounted for by the spectra of the elements known at the time.
Rainbows:
While there is sufficient separation of colors to created noticable color effect, in actual fact there is a lot of overlap. The amount of overlap is such that any details get averaged out.
Prism:
A well manufactured prism will not have the kind of overlapping that you have with a rainbow, so I do expect good separation of the individual colors of the light.
I don't know what level of spectroscopy is possible with prisms.
I'm not sure, but it may well be that with a prism there is not enough dispersion of the light to obtain sufficient detail.
To my knowledge: as soon as the technology became available spectrosopy moved to diffraction gratings. The closer the spacing of the lines of the diffraction grating the bigger the separation of the spectral lines.