All you can really tell them is how sorry you are. I know that when my daddy died, I didn't really hear much. You sort of go into a fog. I do remember the people who told me stories about things my father had done for them, and it touched me to know that his life enriched many more lives than just those of his family.
I have not had a mother or father die, but my best friend's mother died recently, and I had no idea what to say to her. But I was there for her so she could talk to me if she wanted to, and if it felt like she didn't want me to be sympathetic at that moment, then I did the best I could to cheer her up. I acted as we normally would before her mother died. Its really hard because I was fond of her mother too, but we struggled through together. Just support that person in anyway that you can.