“Stand beside her, and guide her,” we sing in “God Bless America.” Come to think of it, most nations of the world are referred to in the female gender. Why is that?
English is one of the few languages that does not distinguish between masculine and feminine nouns. For example, in English, a cat is a cat, and a dog is a dog. But in French (for example), a cat is la chat, making it a feminine noun, while a dog is le chien, which makes it masculine (whether or not it’s actually a boy).
Latin, one of the sources of the English language, also has feminine and masculine words, and terra firma is one of them. Terra firma means earth, or solid ground, and it is feminine. So, partly because of its Latin origin, and partly because the rich earth beneath our feet was the original source of food (and nurturing) for our ancestors, our humble planet became known as Mother Earth.
Keeping with that train of thought, all land in general was eventually referred to in the feminine sense. We speak of “her shores” and “the Motherland.” The sole exception is Germany, which, during World War II, was known as "Vaterland.” Technically, vaterland is gender-neutral, but it was translated into English as “Fatherland.” The term is not used much today, due to its negative connotations.