Particle motion in one-dimensional crystal chains is studied with the help of the transfer matrix method. The transition from a finite to an infinite chain is analyzed. In the cases where an analytic solution is impossible, the method allows calculating the energy spectra with reasonable accuracy, based on the known cell potential. It turns out that the structure of allowed and forbidden energy bands arising in an ideal lattice contains some features that are absent in the real world. This means that the model of an ideal lattice should be extended in order to describe reality. We show that accounting for small random perturbations of periodicity may serve as such an extension. Light propagation in a layered medium (including a photonic crystal) is studied using the same method.