First God's character is perfect and everything He does is right.(See Deut.32:4). He is "compassionate and gracious...and abounding in loving kindness(Ps.108:8). By His very nature,God is good.Second , our heavenly Father expresses His goodness based on His goodness based on His purpose of conforming us to the image of Christ (Rom.8:29). From the Lord's perspective, everything that fits into His plan is beneficial for us.
The greatest demonstration of Father's goodness is seen in His Son's life and death. Jesus left His heavenly home, took on the form of man, suffered and died in our place so we might be forgiven (Phil.2:6-8). Because of what our Savior endured, we who have trusted in Him are adopted into God's family, and heaven is our eternal home.
At the time of Christ's crucifixion, the disciples could not see anything beneficial in it. They knew only great sorrow. But we understand that God gave His own Son so that He might accomplish our salvation(Rom.8:32).
Our definition of the good life would probably include material success, good health, and the absence of trouble-things that make us happy right now. But God has an eternal perspective, and He always works to fulfill His long-term plan for us. We can trust in His goodness,even in dark times.