A rocket leaving the moon would be able to attain a higher speed in space than an identical rocket leaving from Earth, primarily due to the differences in gravity and atmosphere.
The maximum change in velocity deltaV of the rocket is given by the Tsiolkovsky rocket equation*,
deltaV = v_e*ln(M_0/M_f),
where v_e = effective exhaust velocity; M_0 is the initial total mass of the rocket, which includes the mass of the propellant; and M_f = the mass of the rocket after some desired amount of propellant has been used (thus equaling the mass of only the rocket if all propellant is consumed).
However, this equation is for the ideal case where there are no losses, meaning a rocket that is acted on by no forces other than those generated by throwing the exhaust out the back of nozzle and all propellant is used to push the rocket in one direction. In any real scenario, there will be forces acting opposite the direction of motion of the rocket which will reduce the deltaV achieved. One is gravity drag, which is the cost of pushing the rocket against the pull of gravity. This cannot be calculated analytically (numerical simulations are used instead), but since the gravitational field of Earth is greater than that of the Moon, one can conclude at least that the gravity losses will be greater for the rocket starting on Earth than for the rocket starting on the moon.
In addition, Earth has an atmosphere. This will cause drag (essentially friction with the atmosphere) which will further reduce the final velocity. Because the Moon does not have an atmosphere, there will not be any drag losses for that rocket. For both cases there may also be reductions from the ideal case if some of the propellant is used to steer the rocket (i.e., some of the exhaust is expelled in a direction not parallel with the direction of motion) instead of only contributing to increase in velocity. The losses for this will depend on how much steering is required/desired, but a reasonable guess is that the rocket leaving Earth will require more steering due to the atmosphere.
Even without numbers for all of these terms, it should be clear that the rocket leaving the Moon will be able to achieve a greater speed: the ideal (i.e., maximum) change in velocity is the same for both rockets, but the rocket starting on Earth experiences more efficiency losses.
*Note that this equation if often written in terms of equation 12 here for the ideal exhaust velocity.