What are the correct initial conditions for the moon (in a simulation)? So I've modeled the interactions between the sun and all the planets (and the interactions between the planets) using Verlet integration.
I've used data from Wikipedia for masses, distance from the sun etc. 
I initialized the initial velocities of the planets via the critical velocity equation. 
This produces nice stable velocities. 
I'm unsure of how to calculate the initial velocity of the moon so that it stays in orbit around the earth.
 A: The moon orbits the earth with a near circular trajectory relative to the earth. So add earth's orbital velocity (around the sun) to the moon's orbital velocity (around the earth).
This will put the moon into an orbit around the earth, but might make it a bit more eccentric (elliptical). To correct this you can use angular velocity around the sun with respect to the barycenter (center of mass) of the earth moon system. The resulting initial velocity will then be their velocity around the barycenter (since the earth also orbits the moon) plus the angular velocity of the barycenter times their distance from the sun.
Once you have calculated all of this you might also want to set the momentum of the entire system to zero, since otherwise the center of mass of the entire system will keep on moving with a constant velocity.
A: You may have noticed that if you start with the sun at rest, and put Jupiter into the system with an initial velocity to (say) the left, then over time the whole system moves left. (If you haven't noticed this is it worth setting the system up that way and letting it run long enough that you do notice it.)
The trick is to recall that both bodies orbit their combined barycenter and put them in with linear velocities found in the CoM frame.
For the Earth-Moon system you have to do the same thing, and then set the CoM system's velocity relative the Sun as if the pair were a planet.
