Remember that grief is different for everyone and you cannot know how they're feeling. So, it's best to avoid saying things like 'they've gone to a better place', or 'it's a good age' as they can make someone who is grieving think that their feelings of loss are being dismissed.
Take your lead from them. They may want to talk to you in detail about what happened and how they feel, or they may not.
If you knew the person who has died, it can mean a lot if you can share any happy stories or tell them about kind things you remember the person saying.