A quantum-mechanical model for quantum well polaritons in semiconductor microcavities is presented. The real and imaginary parts of the polariton dispersion are obtained. They represent, respectively, the position and the linewidth of the luminescence peaks observed in typical experiments. The model includes the features of the distributed Bragg reflectors which constitute the cavity mirrors, and has the advantage of describing the weak-coupling as well as the strong-coupling regimes characteristic of this kind of systems. Furthermore, in the limit where no cavity is present, the well-known result for quantum well polaritons is recovered.