The NASA style guide indicates that Earth and all the other planets of the solar system should be capitalized when you talk about them as celestial bodies. For example: “Mars is 38. 6 million miles (62. 07 million kilometers) from Earth at its closest approach” or “The only home we’ve ever known is Earth. ”
For example, both “Earth is the third planet from the sun” and “The Earth is the third planet from the sun” are grammatically correct. An article modifies a noun. In English, there are 2 articles: “the” for specific nouns and “a/an” for non-specific nouns.
For example: “The tree’s roots extend deep into the earth” or “She picked up a handful of earth and sifted it between her fingers. ”
“What on earth is going on?” “He’s really down to earth. ” “That place is hell on earth. ”
In “Earth orbits the Sun,” “Sun” is capitalized because the sentence refers to the specific star our planet orbits. In “Jupiter has many moons,” “moons” is lowercase because the sentence describes a group of other moons that are not ours.
According to the AP, a sentence like “The moon orbits Earth and Earth orbits the sun” is correct. NASA prefers “The Moon orbits Earth and Earth orbits the Sun. ” The AP and NASA agree “sun” and “moon” are lowercase in sentences like “Let’s get out of the sun” since the sun isn’t being talked about astronomically. AP rules still say that “Earth” should be capitalized when used as a proper noun referring to our planet.
If you’re being poetic and using the Roman names for the moon and sun (Luna and Sol, respectively), capitalize them. If you’re writing for an organization that uses a specific style guide, follow that guide’s rules on capitalization for sun and moon.