Animals have genders, so there is no comparison between them and inanimate objects such as the luminaries, really. You would call a male dog 'he', a female rabbit 'she' etc. Some animals even have names for their male/female counterparts (for example, cows/bulls) so the gender is clear before you even use a pronoun. However, it is probably even more common for a native English speaker to refer to an animal as "it" unless they knew its gender. "It" may even be the default for animals for many people unless the animal is being anthropomorphised, or if the animal is well-known to the speaker such as a pet.
What gender to use for the sun and moon is not really answered authoritatively by English linguistics. In English, we don't automatically assign genders to inanimate objects as in some other languages, but in French and other Latin languages the sun (sol) is masculine and the moon (luna) is feminine.
Mythologies offer a different perspective. Norse, Egyptian, Hindu, and Sumerian mythologies contain moon-gods that are masculine, while in ancient Roman, Greek, Chinese, and Inca mythologies there are feminine moon-goddesses. There are also various European folk tales about a 'man in the moon'.
So, there is no definite choice. If you are trying to be poetical, and wish to imitate classical Latin sentiments then perhaps go with a masculine sun and a feminine moon. However, it also popular these days to subvert expectations with regard to gender, and if you were to assert that something is feminine when most would consider it to be masculine that can be an interesting literary twist.