Thoth is also known as the tongue of the one and only sun god. He had to speak in Ra´s behalf and spoke the words that satisfied Raś dreams and wishes.
Since he did such a good job at being a scribe and helping the gods, he was named a god.
First he was seen as more of a god of the moon, then later he was also seen as the god of wisdom,magic and also the person to keep track of the events in time.
He was believed to be the god of the moon because the Egyptians believe that both of Horus´s eyes represented the sun and the moon. Then they say that Horus got in a fight and hurt his eye and that thoth restored it and is now known as the god of the moon.He became credited as the inventor of writing(hieroglyphs) to the ancient Egyptians.