The electronic spectra of the title molecules have been studied using a newly proposed quantum chemical approach for ab initio calculations of dynamic electron correlation effects in molecular systems: multiconfigurational second-order perturbation theory (CASPT2). For cyclopentadiene and furan, the calculations comprise three valence excited singlet states and, in addition, the 1a2 --> 3s, 3p, and 3d Rydberg states, thus providing a full assignment of the spectra in the energy range below 8.0 eV. For pyrrole, the 2b1 --> 3s, 3p, and 3d components of the Rydberg series have been added. The four lowest triplet states have also been studied in all three molecules. The computed excitation energies deviate from experiment by less than 0.17 eV in all cases where an assignment is possible. It is shown that the two main features in the spectra are caused by the valence excited states B-1(2) (5.27, 5.92, 6.04 eV) and 1A1+ (7.89, 7.46, 7.74 eV), where the calculated energies for the two states in the three molecules are given in parentheses. In addition, the 1A1- state has been determined to appear near 6 eV in all three molecules. These results differ drastically from earlier theoretical predictions but are in agreement with experimental data. A number of new assignments of the Rydberg states are suggested.