It refers back to what we' ve seen in verses 3-5. God caused us to be born again to a living hope through the resurrection from the dead. There's an inheritance and there's an inheritor. The first reason for our joy is the great future God promises us and his unswerving commitment to keep it for us and us for it. In other words, our joy is based on the happiness of our future with God and the certainty that we will make it there.
Christian joy is almost synonymous with Christian hope.
Our hope is our joy. The second reason is that God has a design for our distresses in this life. But now don't misunderstand me. The second reason for joy is essentially the same as the first one, namely, hope. In verses 3-5 the point is that the inheritance is out there waiting for us imperishable and unfading, and that we are being kept for it, so that no matter what distresses we face we can look beyond them to the sure future that is coming and take heart.