The rate at which nuclei are produced in a multistep laser ionization process is calculated as a function of the resonant laser excitation frequency. The model enables the fitting of the hyperfine spectra obtained by resonantly exciting and ionizing beams of (short-lived) nuclei. The fit parameters are the nuclear dipole and quadrupole moments, an isotope/isomer shift and the laser powers. The dressed-states approach for the interaction of laser light with an ensemble of atoms and the influence of the ionizing step as an irreversible process in a two-level system allow a very clear understanding of the physical process. In addition, it is seen that the yield of the on-resonance produced ions is sensitive to the angular momenta of the electron levels and to the nuclear spin.