Pain and suffering is not always an indication that someone has committed sin. The wicked often live in pleasure and the righteous often live in hardship. Tragic events are not always punishments sent from God; they can simply be unfortunate natural circumstances.
We often view death as a great tragedy but death is inevitable. We must prepare to face death while we are still living. We must obey the Gospel and receive salvation so that death does not have to be a tragedy. If we are willing to obey the Gospel and live faithfully we can have eternal life after death.