To understand and know an invisible God, all we can look at is the evidence of His hand - the world He created and the person He fashioned after Himself - Man.
When looking at the two, we must bear in mind that the picture we see now is a broken one, an imperfect representation of the Master's original masterpiece. Before sin entered the world, creation worked in harmony with its Creator and man lived in perfect innocence and communion with God.
He gave us free will because it wouldn't be real love if we were forced to love Him and not be able to choose Him of our own accord. The down side of free will is that we now have the ability to choose the wrong thing, to make the wrong decision, to go against God's laws. And thus, sin entered the world and we were never the same again.
So now, we live in a fractured state, seperated from our maker, existing in a world that no longer functions as it was originally intended to. Nethertheless, this does not alter the nature of God. Just as one bad painting does not change the fact that the painter is still the painter, so God is still God, is still good and still desires us to live in perfect fellowship with Him (i.e. His goodness being displayed in the beauty of life back in the Garden). All good things come from the Lord, and the painful, unjust things are only part of the broken world we live in. Rather than asking "Why?", a better question is "How?"... How does God fix the problem of seperation that our sin causes?
He fixes it with an offer - receive the sacrifice of my son in place of your sins and be reconciled to Me. The price that our disobedience demands has been paid on our behalf, and the freedom of righteousness is available to all who choose Jesus as their saviour.
Pain and suffering come to all - following Jesus doesn't exclude us from this - but what it does offer us is a comforter who walks besides us, a friend who sticks closer than a brother, and a God who understands all we go through, because He has been through it all, for us.
And the eternity that we have all been made for, for which our spirit longs, is where our ultimate focus should be - on that glorious day when all tears shall be wiped away and ever hurt and pain healed forever.