The resonant state expansion (RSE), a novel perturbation theory of Brillouin-Wigner type developed in electrodynamics [Muljarov, Langbein, and Zimmermann, Europhys. Lett., 92, 50010(2010)], is applied to planar, effectively one-dimensional optical systems, such as layered dielectric slabs and Bragg reflector microcavities. It is demonstrated that the RSE converges with a power law in the basis size. Algorithms for error estimation and their reduction by extrapolation are presented and evaluated. Complex eigenfrequencies, electro-magnetic fields, and the Greens function of a selection of optical systems are calculated, as well as the observable transmission spectra. In particular we find that for a Bragg-mirror microcavity, which has sharp resonances in the spectrum, the transmission calculated using the resonant state expansion reproduces the result of the transfer/scattering matrix method.