Why are moles used in the ideal gas law and not simply mass?
The overall notion is that gases exhibit "ideal" behavior so that the identity of the particular gas molecule doesn't matter. Thus regardless of what compound the gas molecule is, or if the gas is a mixture of different compounds, a mole of gas molecules at standard temperature and pressure (STP, 0 °C and $1.000\times10^5$ Pa) occupies a volume of 22.7 liters. So the equation for an ideal gas is 

$$PV = nRT$$

In addition, there is the Maxwell–Boltzmann distribution which is for the speed of molecules. The gist is that regardless of the compound, gas molecules have the same kinetic energy spread. Since kinetic energy is given by $mv^2/2$, that means that lighter molecules have faster speeds than heavier molecules. 

If you try to define the relationship by the molecular weight of the gas, then the value of the gas constant, $R$ would be different for different compounds and/or mixtures. Now in reality the ideal gas law works reasonably well, but there are empirical equations which fit the relationship between P, V, and T better. For those empirical equations the extra coefficients are fitted to the experimental data for particular gas compound under consideration.