Just be there for her. If you have that sort of relationship, just hug her and let her cry if she needs it. Be honest, and say "I don't know what to say - I'm so sorry". Because honestly, what one person needs to hear is not the same as someone else. Tell her that you're there for her if she wants to talk about it, or even if she doesn't want to talk about the miscarriage but wants to talk about the weather, politics, or the man on the moon - whatever - you're there for her.
My brother and SIL didnt' know what to say to me when they saw me after my miscarriage. I brought it up, quite calmly, actually, and my SIL just said, "I didn't know what to say, so thought it would be better to not say anything". Um, no. They knew about the pregnancy, just a hug and an "I'm so sorry" would have been just fine. But at the same time I didn't want to go on and on about it, like some people did.