When I was a child, I would wave to the man in the moon who I imagined peering down at me through the window.
It wasn't until I became a Pagan that the moon came to be associated with the feminine.The phases of the moon just seem like the perfect symbol for the stages of a female and for the menses.So when I first heard about moon gods, I was sure there was some mistake.How could that be?It not only can be, but isn't as unusual as I thought it was.
Humanity has been studying and dreaming about and mythologizing the heavens since before the beginning of recorded civilization. No doubt, our ancestors were telling tales about the sun and stars even as they made the long trek out of Africa. Studying the heavens formed the very basis of some civilizations (see Sumer and the Maya, for example), giving rise to calendar systems, festival cycles, and whole arcs of mythology.
For those interested in the origins of the myths of the heavens (as opposed to just the science, which is a fascinating topic in and of itself) a good place to start is Exploring Ancient Skies: A Survey of Ancient and Cultural Astronomy by David H Kelley and Eugene F Milone. Dense -- though never boring -- Kelley and Milone's book offers a solid grounding in the place of "naked eye" astronomy in ancient civilizations, how our ancestors' observations shaped their civilizations, and the myths and legends that arose around celestial phenomena. A useful interdisciplinary reference, which I recommend for older children and adults interested in the history of astronomy.