We discuss how a spectral-domain method in combination with a split-operator technique can be used to calculate exact solutions of the time-dependent Maxwell's equations. We apply this technique to study the tunneling signal of an evanescent wave occurring due to frustrated total internal reflection and the propagation of a light pulse through an inhomogeneous medium consisting of multiple random scatterers.