We have theoretically studied exciton states and photoluminescence spectra of strained wurtzite AlGaN/GaN quantum-well heterostructures. The electron and hole energy spectra are obtained by numerically solving the Schrodinger equation, both for a single-band Hamiltonian and for a non-symmetrical 6-band Hamiltonian. The deformation potential and spin-orbit interaction are taken into account. For increasing built-in field, generated by the piezoelectric polarization and by the spontaneous polarization, the energy of size quantization rises and the number of size quantized electron and hole levels in a quantum well decreases. The exciton energy spectrum is obtained using electron and hole wave functions and two-dimensional Coulomb wave functions as a basis. We have calculated the exciton oscillator strengths and identified the exciton states active in optical absorption. For different values of the Al content x, a quantitative interpretation, in a good agreement with experiment, is provided for (i) the red shift of the zero-phonon photoluminescence peaks for increasing the quantum-well width, (ii) the relative intensities of the zero-phonon and one-phonon photoluminescence peaks, found within the non-adiabatic approach, and (iii) the values of the photoluminescence decay time as a function of the quantum-well width.