Why is electromagnetic wave (light) a sine wave? If I remember correctly solutions to the wave equation are any periodic function. My question is related to light.
Is there a reason why light waves are sine waves?
Theoretically where do sine waves come from as representation of a photon?                
 A: You asked in the context of photons so I wanted to address that question but basically the punchline is the same.
In one sense the most basic periodic processes are uniform rotations and a sinusoidal wave is just a projection of a uniformly rotating point onto an axis. This is very helpful because it turns out that the complex numbers are just scaled rotation matrices, so we do all of our quantum mathematics with complex numbers. To just take QED, the amplitude for a photon to travel a distance $r$ is related to the wavelength of that photon $\lambda$ by the expression $e^{2\pi i~r/\lambda}/r,$ and then if two paths are nearby each other with nearly the same $r$ varying by a much smaller distance $\delta$, the amplitude to go through either path is just the sum of the amplitudes, with the leading term being $r^{-1}e^{2\pi i~r/\lambda}(1 + e^{2\pi i~\delta/\lambda}).$ After taking the squared absolute value that turns out to be $r^{-2}~(2 + 4 \cos(2\pi\delta/\lambda))$ for the probability. 
The "trick" above is that we were careful to speak of light of only one color, and that forced one wavelength, which forced a very simple expression in terms of the rotation matrix $e^{i\theta}.$
The key here is that the low-energy electromagnetic theory obeys the principle of superposition, so that when you overlay two valid solutions you get a third valid solution. When you have the principle of superposition you can choose to think of your electromagnetic wave as built out of a periodic basis. In fact you can always choose to look at it that way, but when superposition holds you don't need to think about any of your miniature-waves interacting.1 Building out of the rotations, as the Fourier transform does, allows us to think of these very particular wavelengths and say "okay, when I say 'particular wavelength $\lambda$' I just mean that the phase we observe when two of these paths interact has to go like $\theta = 2\pi ~r/\lambda,$ put that into the rotation matrix to get the wavy interference $e^{2\pi i~ r/\lambda},$ also we need it to diminish in intensity like $1/r^2$, in amplitude space we take the square root, so multiply by $r^{-1}$," and then we have our probability amplitude for QED and the rest of the argument above holds: you see sine waves for these "single wavelengths" and whenever you see something else you choose to interpret it as "Oh, there was a superposition of many different waves with different wavelengths here."
At a more fundamental level it is indeed surprising that Nature builds these lowest-level processes out of scaled rotations. Are there other ways to build up a theory with "wave interference" as we have seen it? There are various interpretations of this part of quantum mechanics; Scott Aaronson for example is on the record with an interpretation that we have to do probability with some sort of numbers but in some sense the only possibilities that can work are either real numbers or complex numbers, and the complex theory has the real theory "built in" so it's just the most general description that we can muster: so why would it be surprising that Nature should choose its only available option? But then you also have people like Roger Penrose who are saying "no, this sounds much more nontrivial and maybe these complex numbers are somehow a deep consequence of the structure of curved locally-Minkowski spacetime itself." 


*

*At very high frequencies photons can potentially interact, breaking this principle, by creating virtual electron/positron pairs which then annihilate as part of the interaction, but the frequencies where this becomes "resonant" and therefore easy to detect are almost a million times higher than visible light. A positive result detecting these high-energy scattered photons was claimed by the LHC only last year. So it's not a part of our everyday experience.

A: As you stated, the electromagnetic field in vacuum can be described classically by a wave equation
$$\nabla^2\vec{E}(\vec{r},t)-\frac{1}{c^2}\frac{\partial^2\vec{E}(\vec{r},t)}{\partial t^2}=0$$
This equation is linear, which means that if $\vec{E}_{1}$ and $\vec{E}_{2}$ are solutions then also $\alpha\vec{E}_{1}+\beta\vec{E}_{2}$ is a solution. Thus, the set of all solutions to this equation is in fact a vector space, and as such we can look for a basis that spans it. A standard choice of basis for the wave equation is the set of all plane waves
$$\vec{E}(\vec{r},t)=\vec{E}_{0}e^{i\left(\vec{k}\cdot\vec{r}-\omega t\right)}$$
which can be translated to the sine and cosine you mentioned. In summary, sine and cosine are not special, they just form useful basis when dealing with waves. A general waveform can be expressed as linear combinations of those
$$\vec{E}(\vec{r},t)=\int\vec{\tilde{E}}(\vec{k})e^{i\left(\vec{k}\cdot\vec{r}-\omega(\vec{k}) t\right)}{\rm d}^3k$$
Thus light waves don't have to be sines or cosines, but also (infinite) sums of those. For example, some LASERs like Ti:Sapphirre use a technique known as Mode-Locking in order to achieve very short pulses of light. This is demonstrated in the figure below taken from wikipedia article on mode locking. In the lower part of the figure you see the actual pulse of light emitted by the LASER. In the upper part you see its decomposition into sine and cosine modes. In other words, if you sum the functions in the upper part, you'll get the pulse in the lower part.

A: In your comment to eranreches answer you ask

If we are able to measure the E and B fields in time of light would we measure sine wave?

Yes, if you accept a indirect measurement. Generating radio waves one accelerate a lot of electrons in the antenna rod and by this a huge number of photons in phase get emitted. Although each photon is in the range from infrared to X-rays and for this frequencies it’s not easy to measure the electric or magnetic field component, in radio waves in-phase photons follow each other in the duration of e.g. kHz to MHz and this is measurable. In the near field the radio wave looks like this:

The near field of a radio wave
The sine (cosine) wave is a harmonic oscillation and the sine for the electric field component together with the cosines for the magnetic field component perfectly conserves the energy content of the photon. Unfortunately scientists find out that both field components of the photon oscillate in phase.
