Call, text, be diligent about trying to get in touch. If they don't respond, don't be offended. Wait a while and try again in a few weeks.
Be willing to listen. Get over your own discomfort and awkwardness and hear what they have to say. Don't hide your emotions; it means something to know that someone else feels something for my baby. The worst thing you can possibly say is nothing at all.
DO google for information about what to say when someone loses a baby. Read a few baby loss blogs. If you truly care about this person, take some time out of your day to research- there's a lot of information out there.
Remember their baby's special dates- their birthday (even if they were stillborn, yes it is their birthday- it's the day he/she was born), the anniversaries of their passing (months & years), their due date. Consider how the holidays may be difficult for this family. Acknowledge that someone is missing from their family on these special days and that you understand they may be struggling.
DO something to honor their baby. Release some balloons with the baby's name on them & send photos, cook the family dinners, plant a tree in the baby's name, name a star after their little one, the list goes on and on. Again, the internet is a great resource for this stuff. It's not enough to simply say "Let me know if I can do anything" and then sit back and wait. Figure out a way to help or at least honor their child's memory.
Make an effort to see them if you can. Small settings or one on one is better; they're going to feel awkward in crowds for a long time. Don't judge their grieving process. Mostly we are not looking for suggestions or for someone to "fix" us, we just want someone who is willing to listen.