Mormonism teaches that God has a goddess wife (your “Heavenly Mother”), and together they conceived you as an ethereal child in heaven. In this “pre-mortal life” you sided with God and your brother Jesus in the “great rebellion” against your brother Satan. Therefore, you now earned the chance to become a God yourself, being born into a physical body here on earth, past memories erased, to test your metal.
Mormonism's Official Curriculum Material etc.
• “great rebellion, Satan and all the spirits who followed him were sent away from the presence of God and cast down from heaven. A third part of the hosts of heaven were punished for following Satan (see D&C 29:36). They were denied the right to receive mortal bodies. Because we are here on earth and have mortal bodies, we know that we chose to follow Jesus Christ and our Heavenly Father.” [Chapter 3: Jesus Christ, Our Chosen Leader and Savior]
• Joseph Fielding Smith (Mormonism's 6th president-prophet): “We came to this earth that we might have a body and present it pure before God in the Celestial Kingdom. The great principle of happiness consists in having a body” [Teachings of the Prophet Joseph Smith, sel. Joseph Fielding Smith (1976), 181.]