If there were ever a question without a one-size-fits-all answer, this is it.
You really, really need to know what you're doing and what the mourners' community's customs are. It's not that a well-intentioned error will cause offense. But it might make them feel worse in some way at such an emotional time, and I know you don't want to do that. So take the time to do your homework if your bereaved friend is in a different religious, cultural, or geographical community.
For example, Jewish funeral and mourning customs are so different from Christian ones that they are in some ways completely opposite. For example, the funeral is held as soon as possible -- in Israel, often the same day as the death -- and the formal mourning doesn't begin until after. There is no viewing or visitation prior to the funeral. Unless you are very close family or perhaps the mourner's very best friend, you don't visit before the funeral. After the funeral and burial, people gather at the home of one of the mourners for the meal of consolation. Guests serve the mourners (first degree relatives -- parent, child, spouse, sibling) at the table, then everyone else eats. Then for the remainder of shiva (usually -- don't ask!) 7 days, people gather every evening for a short service. There is always food out, sometimes enough for a meal, other times just sweets, fruit, etc.
It is definitely the custom for people to bring food, both for these "public" events (either you cook it or you buy it or you chip in for a caterer -- it's usually easy to figure out who the best friend or cousin who will be organizing it all will be) and for meals for the family for a week or so. I usually bring soup and some bread; it comes in so handy for a meal one exhausted day. Our good friends recently lost an infant grandchild; the community in which the family lives has already signed up for meals for MONTHS -- I imagine that there will be some request back the other way to make charitable contributions instead after a few weeks. Charitable contributions are also a very strong custom. If the family doesn't specify something in the obituary or otherwise, then you choose something you think they would like -- a favorite charity of the deceased or the mourner you know best, if you know it; if not, their synagogue or their children's school or camp or something is usually a safe choice. I was very moved by the thought that went into some of the charity choices our friends made when our fathers died. It made me feel like their good works were continuing on.
Flowers, so appropriate in most cultures, are not customary for Jewish funerals or as gifts for mourners. (Not to put to fine a point on it, that is because Jews do not embalm and hold the funerals fast, so flowers were not needed for the obvious reason before the age of refrigeration). Food and especially charitable contributions are.
I would think that in any community, a (very short!) note saying something nice about the deceased would be appreciated. I don't care for printed sympathy cards; I just use a note card or letter paper, or write a short note in a donation card. Be careful, though -- many people don't do a good job with those notes. Usually they get in trouble when they go on for more than a line or two. This is one time where you DON'T add something about another topic in a note, as you would in a good thank you note. Stay 100% away from anything telling the mourners that you know how they feel or even worse telling them how they should feel (e.g. "She's better off now that she isn't suffering" or "He's in a better place now"). I know people who do this are just trying to be comforting, but the effect is the reverse. The trick, I think, is to focus on the life, not the death. Much better to say something like, "Whenever I think of your dad, I remember the time he laughed so hard when the dog skidded across the room. I will never forget how his smile always lit up a room." If you don't know a thing about the deceased, you can still say something nice -- a note I got from a friend who happened to be a communications coach said, "Although I never knew your father, I am sure he was very proud of you and your brother and all your accomplishments." I thought that was quite good. And when in doubt, there is really nothing wrong with simply writing, "Dear Camellia, we are so sorry to learn of the loss of your mother. May she rest in peace. Our condolences to the whole family. Fondly, Gell and Chom."
The only time I've ever contributed money for funeral expenses was for a non-Jewish funeral (my hairdresser). She had died suddenly and someone was taking up a collection for the funeral expenses. I was happy to do it, but it would never have occurred to me if I hadn't been advised.