Blimey, that's terribly sad. Your poor friend and her family. And you too, I imagine you knew the child.
I can only say, be there for your friend, let her talk, cry with her, don't ignore her pain cos you don't know what to say, better to actually say, " i truly do not know what to say but just want you to know We are here"
Be practical, take the family some food, milk, bread, etc
Has she other dc's? Offer to take them out, although she might just want them close by right now.
Send her a card and in it, write about her beloved dc, what you felt about them when they made you both laugh that time, (pick an incident)
I don't have any wise words I'm afraid, it's every parents nightmare isn't it? Hugs to you all. x