Sometimes we are writing about the sun, the earth and the moon, and depending on the context in which we are doing it, we have to use capital letters or not. There are times when teachers consider misspelling and others don't.
When should we use capital letters to refer to these elements and why?
Sun, earth and moon
In astronomical contexts, the moon must be capitalized like the sun or the earth, since we refer to these elements as designative names of the respective objects. However, we write these elements in lower case, when we refer to the stars themselves or to derivative or metaphorical uses.
There are contexts in which it is not necessary that they be capitalized. For example, in the phrase "I'm going to the beach to sunbathe," it is not necessary for the word "sun" to be capitalized since we are not referring to the sun as a designative name. However, in the phrase “the planets revolve around the Sun”, it is necessary that it be capitalized, since we refer to the Sun as a name.
Other non-astronomical contexts
Outside of these astronomical contexts, both in straight usage and in derivative or metaphorical ones, they are written with a lowercase initial in all normality. This recommendation applies especially to expressions such as sunbathe, sun rise, be a sun, full moon, new moon, moonlight, honeymoon, ask for the moon, the disinherited of the earth and other similar ones, where no highlighting such as quotes or italics is not necessary. Ground is always written in lowercase when it refers to the ground: "The plane could land."
In conclusion we can say that in astronomical terms, Sun, Earth and Moon are capitalized because it is as if they were their names. It's like putting your own name in lowercase. In this way, we will not make a mistake again when writing them.