I would like to answer that!
Reasons of suffering:1. As a test (yours and others):
Allah wants to see what you will do when you are in pain, whether you are going to whine and complain or ask for His Mercy and Protection.
And when He gives you a good thing after a bad thing, whether you thank Him or forget Him till the next time you feel His need.
Also, when your neighbour is low on daily provisions, will you help him out or be selfish and keep everything for yourself?
2. As a punishment:
When a person does an evil deed, he will be punished by Allah. Sometimes, they are punished in this world, sometimes in the Hereafter.
Other things:
You might be thinking now that if Allah wants to 'see' what people do under these conditions then He doesn't know already. However, that is not the case.
In fact, if Allah wanted, He could have rewarded people of their deeds right after creating them. However, then those who had gone to Hell would have said that they weren't given the opportunity. That is why this world is the opportunity by Allah to do good and shun evil, so that you may be rewarded justly in the Hereafter.
You would note that many of the good people in the Islamic history have been tested more severely. Take the example of prophets. All prophets were tested in quite extreme ways that any ordinary person would not have been able to pass with steadfastness. Each test either brings one closer to Allah or farther away.If you grow closer, you will tested again to see whether you can achieve the next level of closeness. If you are not nearly good, you will be forgiven by Allah until the Day of Judgement, when the punishment will be hard.