TANYA - Does HF allow trials to make us stronger and teach us lessons? I've heard people say that he chastises us, but I just don't know.
JOEL - God rarely punishes one of His children in this life because of sin; that type of punishment is mostly reserved for the next life. Pain and suffering happens to both the evil and the righteous:
"for he maketh his sun to rise on the evil and on the good, and sendeth rain on the just and on the unjust." (Matt 5: 45)
Usually the only punishment for sins we experience in this life are the normal consequences that come to us as a result of committing the sin.
Joseph Smith said:
"it is an unhallowed principle to say that such and such have transgressed because they have been preyed upon by disease or death, for all flesh is subject to death; and the Savior has said, 'Judge not, lest ye be judged."' (Joseph Smith, History of The Church of Jesus Christ of Latter-day Saints, 7 vols., 2nd ed. rev., edited by B. H. Roberts (Salt Lake City: The Church of Jesus Christ of Latter-day Saints, 1948) 4:11)
God does allow trials to happen to us to teach us and give us expereince in this life (D&C 122: 7) and build character. He also allows it to humble us (Alma 32: 6, Alma 62: 41); to see if we will put our trust in Him (Psalms 37:40, Isaiah 26:4); and remain faithful (D&C 58:2, Mosiah 23: 21); and rely on Him to help get us through it all. Mostly He just wants to see how we respond to it so we can prove to Him we are worthy of exaltation.
If one suffers and does nothing else but complain about it, it has done us no good. If however, one is willing to learn from it and become stronger because of it (2 Cor 12: 9-10, Ether 12: 27); it's purpose has been accomplished.
In most cases when people have called upon God in moments of trial and affliction, the answer they got from God was not a removal of the affliction (although that can sometimes happen), but the strength to be able to survive it.
A good example is when Amulon was persecuting Alma and his people, they poured out their hearts to God for help and here is how God responded:
"And now it came to pass that the burdens which were laid upon Alma and his brethren were made light; yea, the Lord did strengthen them that they could bear up their burdens with ease, and they did submit cheerfully and with patience to all the will of the Lord." (Mosiah 24: 12-15).
Take comfort that God loves you and is aware of your suffereing and doesn't want you to give up. When Jesus sufferd for our sins He experienced every possible form of pain that any human would ever experience. This He did so He would understand our afflictions in life and make Him fully qualified to be our judge and mercifully determine our place in heaven.
"And he will take upon him death, that he may loose the bands of death which bind his people; and he will take upon him their infirmities, that his bowels may be filled with mercy, according to the flesh, that he may know according to the flesh how to succor his people according to their infirmities." (Alma 7:12)
So He does understand what you are going through. God gives us this promise:
"Therefore, he giveth this promise unto you, with an immutable covenant that they shall be fulfilled; and all things wherewith you have been afflicted shall work together for your good, and to my name's glory, saith the Lord." (D&C 98:3, see also D&C 58: 2-4)