The magnetic excitation spectra of the electron superconductor Pr1.85Ce0.15CuO4 and related parent compounds Pr2CuO4 and Nd2CuO4 have been determined by inelastic neutron scattering. We observe crystal-field transitions up to about 100 meV within the Pr3+ H-3(4) and Nd3+ I-4(9/2) Russell-Saunders ground multiplets in these materials. We find that a crystal-field treatment of the Pr3+ and Nd3+ ions can adequately explain the observed excitation spectra for both Pr2CuO4 and Nd2CuO4. The obtained crystal-field parameters are close to values estimated from a superposition-model calculation and Mossbauer data. The Pr3+ and Nd3+ wave functions are found to have significant (almost-equal-to 20%) admixture of some states belonging to higher J multiplets. The calculated contributions to the susceptibility of Pr2CuO4 and Nd2CuO4 from the crystal-field states agree well with experiments. The observed crystal-field transitions in the superconductor Pr1.85Ce0.15CuO4 shift to slightly lower energies and are broadened significantly relative to the present compound due to chemical disorder from Ce doping.