Not sure what English textbooks you've been looking at. When talking about the celestial bodies, i.e. the planet we live on and its moon, it's the Earth and the Moon. As a synonym for ground, 'earth' takes no capital, nor do moons in general. If you're not really talking astronomy, then you can talk about the sun and the moon without capitals.