The influence of hydrostatic pressure on the binding energy of hydrogenic impurity state in a wurtzite AlyGa1-yN/AlxGa1-xN parabolic quantum well and GaN/AlxGa1-xN square quantum well are studied using the variational method. The ground-state binding energies are presented as the functions of hydrostatic pressure, well width, composition and impurity center position. The anisotropic properties of the parameters in the system, and the changes (dependence) of electron effective mass, the dielectric constant, band gap with pressure and coordinate are considered in the numerical calculations. The results show that the hydrostatic pressure has obvious influence on the binding energy. The binding energy increase slowly with increasing the hydrostatic pressure p and the composition x, while the binding energy decrease significantly with increasing the well width and the position of impurity center. It is seen that the changing trends of the binding energy as a function of well width, pressure and the composition in the AlyGa1-yN/AlxGa1-xN parabolic quantum well are basically the same with that in the GaN/AlxGa1-xN square quantum well, but the changing trends of the binding energy as a function of impurity center position in the AlyGa1-yN/AlxGa1-xN parabolic quantum well are significantly greater than that in the GaN/AlxGa1-xN square quantum well.