The solid-solution phase of hydrogen in hexagonal close-packed yttrium (a-YH(x)) is studied using the pseudopotential method within the local-density-functional approximation with a plane-wave basis. The binding energies associated with different interstitial sites are evaluated for several ordered structures: YH0.5, YH0.25, and YH0.167. It is found that the occupation of the tetrahedral site is always energetically favorable. The hydrogen potential-energy curves around the tetrahedral sites along the c axis and along the path connecting the adjacent octahedral sites are also calculated for YH0.25. In particular, the local vibrational mode along the c axis is estimated to be 100 meV, in excellent agreement with that measured in neutron-scattering experiments. Finally, the intriguing pairing phenomenon is investigated by calculating the total energy for various pairing configurations. The possibility of pairing between nearest-neighbor tetrahedral sites is excluded due to the high energy. It is found that the pairing of hydrogen across a metal atom is indeed energetically favorable compared with other kinds of pairs considered and also with isolated tetrahedral hydrogen atoms. The connection with the electronic structure of the system is also examined.