The behavior of potential prebiotic species in space is of main concern in the chemistry at the origin of life. Their reactivity or stability in spatial conditions, under strong UV radiations or ion bombardments, remains an open question and needs wide investigations. As protons are by far the most abundant ions in space, we focus presently on proton-induced collisions on imidazole and 2-aminoimidazole evidenced as important prebiotic RNA intermediates. Unconstrained full optimization of the structures was performed with B3LYP/cc-pVTZ model chemistry. The calculations were performed in a wide collision energy range in order to model various astrophysical environments, from eV in the interstellar medium, up to keV for solar winds or supernovae shock-wave protons. Such a study provides for the first time a theoretical insight on the influence of the amino substituent on the proton-induced charge transfer. We evaluated the role of icy grain environments through a cluster approach modeling the effect of a stepwise microhydration on the process. Comparisons with oxygenated and sulfurated analogues address further qualitative trends on the respective stability or reactivity of such heterocycles which may be of tremendous interest in prebiotic chemistry. Charge transfer appears to be quite efficient for imidazole compounds and their sulfurated analogue compared to the oxygenated heterocycle.