We study hydrogen doping effects in an iron-based superconductor LaFeAsO_(1-y) by using the first-principles calculation and explore the reason why the superconducting transition temperature is remarkably enhanced by the hydrogen doping. The present calculations reveal that a hydrogen cation stably locating close to an iron atom attracts a negatively-charged FeAs layer and results in structural distortion favorable for further high temperature transition. In fact, the lattice constant a averaged over the employed supercell shrinks and then the averaged As-Fe-As angle approaches 109.74 degrees with increasing the hydrogen doping amount. Moreover, the calculations clarify electron doping effects of the solute hydrogen and resultant Fermi-level shift. These insights are useful for design of high transition-temperature iron-based superconductors.