A combination of ab initio total-energy calculations and high-pressure x-ray diffraction experiments has been used to study the phase stability of Y-based 1:2 compounds. The motivation for these investigations was to clarify the origin of the change of the structure among the YT2 compounds (T = 3d transition element) between the neighbouring elements Ni (YNi2: defect superstructure of cubic Laves phase C15) and Cu (YCu2: orthorhombic CeCu2-type structure). As a test of the ab initio calculations the cubic YAl2 Laves phase compound has been included in the investigations. The ab initio calculations confirm the reversal of the relative stabilities of the CeCu2 and C15 phases in YCu2 and YNi2 and give also the correct results for YAl2. Furthermore a pressure-induced structural transition is predicted for YCu2. The high-pressure x-ray experiments show that there is very good agreement between the calculated and the measured pressure dependence of the lattice parameters of YCu2 up to about 10 GPa. Above 10 GPa the structure starts to become irreversibly amorphous. This instability may be a hint at the structural phase transition predicted by the calculations.