Based on the Suzuki product-formula approach, we construct a family of unconditionally stable algorithms to solve the time-dependent Maxwell equations. We describe a practical implementation of these algorithms for one-, two-, and three-dimensional systems with spatially varying permittivity and permeability. The salient features of the algorithms are illustrated by computing selected eigenmodes and the full density of states of one-, two-, and three-dimensional models and by simulating the propagation of light in slabs of photonic band-gap materials