Neither the time nor space dependence of a macroscopic (classical) electromagnetic wave has to be sinusoidal. In fact any solution of the form f(x-ct) satisfies the wave equation for any component of the electromagnetic field, with f any function whatsoever. The form of the wave depends on the source (charges and currents) which produced it.
On the other hand it's relatively easy to calculate the radiated EM field for charges and currents which have a sinusoidal time dependence and it's always possible to write any current density as a linear superposition of such fields. That's why these types of fields are important theoretically. Also, for some applications, like radio waves, the fields do vary more or less sinusoidally near the constant (carrier) frequency.
Now, with respect to a single photon (rather than a macroscopic EM field): that's described by a complex valued wavefunction which does not have to be a sine wave either; it only needs to have the general form f(x-ct).
The interaction of a photon and matter has to be analyzed using quantum mechanics. Even for a photon which does happen to have a definite energy (i.e. has a sinusoidal time dependence), the picture of an oscillating electric field of the classical type, that is, a charge being pushed back and forth by an electric field, is inapplicable.
Even though the wavefunction is known, the electric and magnetic fields have to be treated as operators, and their expectation values turn out to be zero everywhere in space. If you try to measure the electric field of a single photon at a point in time, the result will always be unpredictable except for the polarization direction (orientation) for a linearly polarized photon. In other words the phase (whether it's pointing along the polarization vector or in the diametrically opposite direction) is unmeasurable. In any case it's impossible to measure any observable connected to the photon without destroying it.