Some very severe diseases which usually end in death happen for kids or even infants and cause them a great amount of pain!!
Why is this happening? And why the all kind Allah doesn't do anything to cure them or at least release them of this pain by making them die sooner!!
First of all, we have to know purpose of life, and how Allah tests us:
"And certainly, We shall test you with something of fear, hunger, loss of wealth, lives and fruits, but give glad tidings to as-sabirun (the patient ones)." [Al-Qur'an 2:155]
also, regarding the point,why Allah does put anyone in pain, Allah says in Quran:
and it may be that you dislike a thing which is good for you and that you like a thing which is bad for you. Allah knows but you do not know.' (Surah Baqarah: 216)
Which means we never know what is best for us and those children, only Allah knows the best that what is better in it.
Another point is that
(2:286) Allah charges no soul except to its capacity.
So, when we already know that Allah never puts a burden on us, without our patience or what we cannot bear, then we should not have any problem with any problem we face. The pain and suffering children face, it is in their ability to withstand its pain.
Also, this life is just a test, as Allah says in Quran:
And know that your possessions and your children are a test, and that with Allah is immense reward. Al-Anfal - 8:28
Hence? conclusion is that we should put our trust in Allah
'And when someone puts all his trust in Allah, He will be enough for him.' (Surah at-Talaaq:3)