What is the difference between transgression and sin?

The things we do on earth that are wrong cannot all be labeled sin. Just as most secular laws distinguish between intentional violation of the law and involuntary violation of the law, the distinction also exists in the gospel of Jesus Christ.

The fall of Adam and Eve can help us understand transgression
In simple terms, Mormons believe that Adam and Eve transgressed when they took the forbidden fruit. They have not sinned. The distinction is important.

The second article of faith from the Church of Jesus Christ of Latter-day Saints states:

We believe that men will be punished for their sins and not for Adam's transgression.
Mormons see what Adam and Eve did differently from the rest of Christianity. The following articles can help you understand this concept:

In short, Adam and Eve did not sin at that moment, because they could not sin. They didn't know the difference between right and wrong because right and wrong didn't exist until after the fall. They transgressed against what had been specifically prohibited. Because involuntary sin is often called an error. In the LDS language, it is called transgression.

Legally prohibited against inherently wrong
Elder Dallin H. Oaks provides perhaps the best explanation of what is wrong and what is prohibited:

This suggested contrast between a sin and a transgression reminds us of the careful formulation of the second article of faith: "We believe that men will be punished for their sins and not for the transgression of Adam" (added emphasis). It also echoes a family distinction in the law. Some acts, such as murder, are crimes because they are inherently wrong. Other acts, such as operating without a license, are crimes only because they are legally prohibited. Under these distinctions, the act that produced the fall was not a sin - intrinsically wrong - but a transgression - wrong because it was formally prohibited. These words are not always used to indicate something different, but this distinction seems significant in the circumstances of the fall.
There is another distinction that is important. Some acts are simply errors.

The scriptures teach you to correct mistakes and repent of sin
In the first chapter of Doctrine and Covenants, there are two verses that suggest that there is a clear distinction between error and sin. Mistakes should be corrected, but sins must be repented. Elder Oaks presents a compelling description of what sins are and what mistakes are.

For most of us, most of the time, the choice between good and bad is easy. What usually causes us difficulties is to determine which uses of our time and influence are simply good, or better or better. Applying this fact to the question of sins and mistakes, I would say that a deliberately wrong choice in the struggle between what is clearly good and what is clearly bad is a sin, but a bad choice between good, better and better things is simply a mistake. .
Note that Oaks clearly outlines that these claims are his opinion. In life with LDS, doctrine has more weight than opinion, although opinion is useful.

The good, best, and best phrase in the end was the topic of another important Elder Oaks address in a subsequent general conference.

Atonement covers both transgressions and sins
Mormons believe that the Atonement of Jesus Christ is unconditional. His atonement covers both sins and transgressions. It also covers mistakes.

We can be forgiven for everything and become pure thanks to the purifying power of the Atonement. Under this divine plan for our happiness, hope is born eternal!

How can I find out more about these distinctions?
As a former attorney and judge at the state supreme court, Elder Oaks understands the differences between legal and moral wrongs, as well as intentional and unintentional errors. He has often visited these topics. The "Great Plan of Happiness" and "Sins and Mistakes" talks can help us all understand the principles of the gospel of Jesus Christ and how they should be applied in this life.

If you are unfamiliar with the Plan of Salvation, sometimes called the Plan of Happiness or Redemption, you can review it briefly or in detail.