Sikhism teaches that God does not inflict suffering on human beings directly - suffering is allowed by God as a test of courage and faith.
The belief is that God gave humans free willThe ability to make choices (particularly moral choices) voluntarily and independently. The belief that nothing is predetermined., therefore, evil cannot be removed from the world by God, as otherwise God would not be allowing humans true free will.
Sikhs are encouraged to work to do good and relieve the consequences of evil. Those who do evil will be punished:
...in the Court of God everyone will be judged. Those who have betrayed the trust of the people will be shamed and punished.
— Guru Granth Sahib page 1288
The belief is that suffering can draw a person closer to God as people tend to forget God when times are good and turn to God in bad times. Suffering is valued for the good that it often brings out in humans, eg compassionUnderstanding and appreciation of the pain and suffering of others. and empathyAn awareness and understanding of another person's feelings, situation or motives..