'For all mankind' means that it was done for all people, regardless of country, race, religion, etc. 'To come in peace' means without any intent for war or militaristic goals...i.e. with peaceful intent.
They're just saying that going to the moon was done as a peaceful mission and that it represents an achievement for all of mankind rather than an achievement for a particular country.
In space, it becomes obvious that we're all humans living on the same earth. Outside of the blue earth, there's only death, and people's experiences in space sometimes reinforce a notion of the unity of humanity and the unimportance of the divisions that we often focus on.