could be:
"My condolences to you and your family."
"My sympathy to you."
"It was a pleasure knowing (name of deceased)."
"(name of deceased) was an amazing person"
"He/She will be deeply missed."
"I am so sorry for your loss."
If you see the family at a time afterwards, take your cues from them. Depending on your relationship with the individual you could say any one of the following:
"Tell me how I can help?"
"How have you been managing since (name of deceased) died?
"What do you need right now?"
"It's ok if you do not feel like talking right now."
For the most part, be available to listen and just be with the person when you can. Most bereaved want to talk about the person who has died and try not to impede that desire. Encourage them to talk about the deceased and don't change the subject or avoid mentioning the person's name just because you feel uncomfortable.
Remember it's all about them.
About the Author
Andrea Miller is an avid reader, poetry collector, property investor and Mom. She dedicates much of her free time to the production of e-zines keeping parents with cystic fibrosis children up to date with latest medical research. She has recently developed a website at http://www.funeral-poems.com