The first part of these two verse has got to be one of the most oft-quoted verses of the Bible, along with Jeremiah 29:11. It's the great comfort verse. While there are many things one can note, I just have to mention one point.
And we know that in all things God works for the good of those who love him, who have been called according to his purpose. For those God foreknew he also predestined to be conformed to the image of his Son, that he might be the firstborn among many brothers and sisters. ~ Romans 8:28-9
While it is obvious, especially through experience (aka life), that when God works for our good, Paul is talking about our ultimate and eternal good, NOT our preferential or temporal good. Meaning = all things do not work out how we want when we want. Anyway, my point... Christians are always comforting another person going through a hard time by talking about the good that will result. What good? No one mentions that. So, I think people are left to their own interpretation of what good means, which can be dangerous and wrong. But the next verse, verse 29, does provide this information. The good God is bringing about is this: He is at work conforming us into the image of Jesus!
Now, that is good and that is good news! In God's hands, trials do have their benefit -- Christlikeness. Randy Alcorn mentions this here.
Consider it pure joy, my brothers and sisters, whenever you face trials of many kinds... ~ James 1:2