Why is the sun feminine and the moon masculine in German?
Short answer
German genders are grammar, not meaning, and German inherited die Sonne and der Mond from its oldest ancestors. In Latin, and in French, Spanish and Italian today, it is the other way round. Neither is more logical: each language kept what it was handed.
These genders are very old. Old High German already said sunna (feminine) and māno (masculine), and the older Germanic languages before it did the same.
Gender is a word’s, not a thing’s
A grammatical gender is a class a noun belongs to. It decides the article and the endings around the noun, and that is all. It says nothing about whether the thing is male, female, strong or gentle. That is why the spoon is der Löffel, the fork die Gabel and the knife das Messer, all on one table.
Every language assigns its own
English dropped grammatical gender about 700 years ago, so it has no side in this argument. Old English, its ancestor, had three genders just like German.
| sun | moon | |
|---|---|---|
| German | die Sonne (f) | der Mond (m) |
| Latin | sol (m) | luna (f) |
| Spanish | el sol (m) | la luna (f) |
| English | the sun | the moon |
What to do with it
Do not look for the reason behind a single noun: there usually is none you could use. Learn the article with the word, and use the endings that do work, like -ung for die and -chen for das.