The escape velocity (the minimum velocity with which a body is to be projected so as to escape from the gravitational pull) on the surface of moon is very much less, less than the RMS velocity (Root Mean Square velocity) of the molecules of gas at the surface temperature of moon. Therefore the molecules will escape and therefore moon cannot hold an atmosphere.
The expression for escape velocity is √2gR
The value of escape velocity on earth is 11200 m/s
The value of escape velocity on moon is 2400 m/s (approximately)
The moon’s surface temperature cycles between −155°C and 100° C (−247° and 212° Fahrenheit). As temperature increases the speed of molecules become more than the escape velocity.
However, moon has an extremely thin atmosphere.