LDS teachings on the meaning of life
What a religion teaches about human nature is foundation for other doctrines like salvation and the afterlife. If human nature is thought to be corrupt, then there is a need for a remedy or a cure. If human nature is generally thought to be good, then the need for a savior or atonement isn't as important. Yet even in worldviews that believe humans are essentially good, there is still a need to be "good enough" in order to experience rewards like heaven. The latter is found in Mormon teaching.
The Church of Jesus Christ of Latter-Day Saints is based on the teachings of Joseph Smith, who founded the religion in the early 1800's. Mormon beliefs are based on revelations he testified to receiving from God concerning the fact that all existing Christian denominations were in error. Smith taught that the LDS church was the true restoration of the New Testament church. This resulted in some similarities and differences between Mormon and Christian beliefs (click link to see a comparison chart).
Mormon beliefs on human nature
People are created as spirits
The teachings of the LDS church on the nature of people is unique. Mormons view humans as ultimately spirits, who lived with God as spirits before they were born on earth. God chose a specific time and place for each spirit to come to earth to receive a physical body. God did this so humans can gain essential experience and prove themselves worthy to return to live with God forever.  Thus the purpose of life is to undergo experiences and cultivate virtues that could not be done in heaven as a spirit, and earn the right to return to heaven with God.
As an official Mormon website explains this doctrine:
You didn’t suddenly spring into existence the moment you were born. You were happy in Heavenly Father’s presence, but He knew that you needed more in order to progress. You did not have a physical body like you do now, and you needed a chance to gain experience on your own—away from His presence, but with the ability to communicate with Him and receive help. So He sent you to Earth, hoping that you would return to Him and receive everything He has to offer you. Before you were born, you lived with your Heavenly Father as one of His beloved spirit children. You knew and loved Him, and He knew and loved you. Although you have forgotten your life before you were born, your Heavenly Father has not. He knows you and loves you. He wants you to come to know and love Him, too. 
In contrast to some Christian denominations that emphasize divine predestination and/or the crippling effects of original sin, Mormons teach that humans have complete free will to do good or evil.  Children are regarded as free of sin and incapable of sinning until the age of 8, when they become accountable. References
- "Core Beliefs and Doctrines." LDS.org Quick Facts.
- "Where did I come from? Mormon.org. See also Does God know who I am? and and "Why am I here on Earth?" at Mormon.org.
- "The ability to choose." Mormon.org.
- "Core Beliefs and Doctrines." LDS.org.