We investigate solutions of a non-relativistic wave equation in hyperspherical coordinates for a diatomic molecule system interacting with a generalized Kratzer potential. Rovibrational eigenvalues and corresponding wavefunctions of non-relativistic diatomic molecules have been determined within the framework of the asymptotic iteration method. Certain fundamental conditions for the applications of the asymptotic iteration method, such as a suitable asymptotic form for the wave-function and the termination condition for the iteration process, are discussed. N-dimensional bound state eigenfunction solutions used in studying the dynamical variables of diatomic molecules are obtained in terms of a confluent hypergeometric function and a generalized Laguerre polynomial. This systematic approach is tested by calculating the rovibrational energy spectra of hydrogen and sodium chloride molecules.