Is Fourier analysis applicable to lightwaves? I'm a mathematician with little understanding of physics.
My questions: In mathematics, we decompose a wave into its elementary parts by using the Fourier transform.


*

*Is this process applicable to lightwaves, ie. may we think of lightwaves as complicated functions arising from several elementary functions that overlay each other?

*Do the elementary functions correspond to single photons, or to groups of photons?

*Does a glass prism do the job of a Fourier transform?

 A: The short answer is yes. Not just a yes, a YES! Optics is one of the subjects that uses Fourier transforms all of the time. (Like a lot of other subjects in physics and engineering)
If we'll think about a  the light wave (or more precisely, the electric field) in one point in space we we'll see it varying with time. If it has a specific frequency $\omega$, meaning that the electric field will be $E=E_0 \cos (\omega t +\varphi ) $ we will see it as a specific color. For example, the light is called "red" when $\omega = 2.7\cdot 10^{15}$, "yellow" when $\omega = 3.25\cdot 10^{15} $ and "blue" when $\omega = 4.2\cdot 10^{15}$, etc...
If you mix these colors, each with a different initial phase and amplitude you can create any function you want*. White light for example is just an addition of a lot of cosines with a lot of different frequencies. 
The discussion above was in a specific point in space, but now I want to talk about a specific temporal frequency. lets say you have a red laser, so by telling you its red, you know that in each point in space the wave will oscillate at a specific frequency. It can be shown that the spacial frequency (often written as $\vec{k}$) is responsible for the direction of propagation, and  by introducing spacial perturbations into the laser beam, it will split into different directions eventually. This phenomenon is called "diffraction" and when analyzing diffraction in the far field region, Fourier transforming the field (in space) will give you information how much energy will go in different directions.
A prism is a device that gives for each $\omega$ a different $\vec{k}$, meaning you can think of it as performing a Fourier transform and sending each color in a different direction. It should be noted that if you want to find the amplitude and phase of each frequency component experimentally by performing manipulations and detection at the other end of a prism (and in principal, the frequency spectrum is continuous so in that case it's impossible) it will be quite difficult. 
footnote: Well, not any function, you can't create $E=e^{t^2}$ but that is not considered physical. As a mathematician you are likely aware of the limitations of the Fourier transform, but these limitations exists in the "real world" too so that's ok.

I think it should be emphasized that the answer to your second question is no. The elementary functions are cosines (as always in fourier transform) which correspond to colors (for transforming in time) and directions (for transforming in space). Photons are a totally different thing which are not connected at all to this subject.
A: A glass prism is not a Fourier Transformer, instead it is a gadget that moves the various frequency components to different spatial locations, it is more like an array of almost filters. Almost filters because to be a filter it also needs a rejection mechanism of frequencies not needed, for example an array of slits to remove the unneeded frequencies from the spread. To be a Fourier Transformer one also needs a coherent detector after each slit (ie., bandpass filter), where coherent means being able to detect amplitude and phase. If only amplitude is detected then you  get the "spectrum" compatible with the resolution here defined primarily by the slit width and the prism's spread.
