I figure it this way. A sun is just a star, sometimes with orbiting planets. A dime a dozen. Our sun is named "Sol." You could capitalize that when needed.
I have always seen the names of planets capitalized. Jupiter is a name, so it follows that 'Earth' is a name, as well.
In general, sun and moon are treated as common nouns (not capitalized). However, Sun and Moon are also the proper names for those celestial bodies, although Sol and Luna are alternate names. When used in the context of celestial bodies, the Sun and the Moon are capitalized like any other named bodies. The Sun and Moon are also capitalized in contexts where they are treated as gods or god-surrogates.
Sorry, but no. Not always. You only capitalise sun, moon and earth when you are writing about them as a celestial body in context with other other celestial bodies such as Mars, Jupiter etc. You do NOT capitalise them in your sentence, or other sentences like, "Where on earth were you?" or "Look at the lovely full moon." But you should write: "The Sun is larger than the Earth and the Moon." "Earth is nearer the Sun than Mars." Edit: I see Cog beat me to it!
I think the previous users were pulling the OP's leg Considering only the example the OP gave - no, of course not! And I've never seen it capitalised anywhere except astrology books where they're really talking about the stars/planets themselves.
i don't know why you'd think that... what cog said is correct... as for mad's examples, i think there could be some author's stylistic preference allowed there, from an editor's pov, though he's correct in re the formal rules 'n regs...
Same with earth/Earth. "Her eyes were brown, like rich earth warmed by the sun." "The Earth is the third planet from the Sun."