Diverse ab initio and density-functional-theory methods were used to investigate geometries, energies, and electronic absorption spectra of guanidine and its protonated form, as well as their photo-deactivation processes. It was shown that the guanidine is a weakly absorbing species with the excitation spectrum consisting mostly of transitions to the Rydberg excited states and one valence n-π state. The lowest energy band has a maximum at ca. 6.9 eV (∼180 nm). The protonation of guanidine affects its excitation spectrum substantially. A major shift of the Rydberg states to higher energies is clearly visible and strongly absorbing transitions from the ground state to the π-π and π-π states appears at 7.8 eV (∼160 nm). Three low-lying conical intersections (two for guanidine and one for protonated guanidine) between the ground state and the first excited singlet state were located. They are accessible from the Franck-Condon region through amino N-H stretching and out-of-plane deformations in guanidine and protonated guanidine, respectively. The relaxation of the π-3s Rydberg state via amino N-H bond stretching was hindered by a barrier. The nondissociated conical intersection in protonated guanidine mediates the radiationless deactivation of the compound after excitation into the π-π state. This fact is detrimental for the photostability of guanidine, since its conjugate acid is stable in aqueous solution over a wide pH range and in protein environment, where guanidinium moiety in arginine is expected to be in a protonated form.