When you make a donation in lieu of flowers to a memorial service, proper etiquette requires spending as least as much as you would on flowers. Additionally, write the name of the deceased on the memo portion of the check so that the charity knows the source.
Normally the family of the deceased suggests a charity for your donation. If they recommend the charity of your choice, try and find a charity that has some meaning to both your family and that of the deceased. For example, if the deceased was involved in the battle to stop breast cancer, and that is a subject near to your heart, a donation to the Susan G. Komen foundation makes sense.
In a case where financial difficulties are well known, consider giving a donation directly to the family to help with funeral expenses and the possible loss of income as a result of the person dying. Bank accounts are usually set up to avoid direct contact with the family, which could cause embarrassment. If no bank account exists, consider giving the money to a clergy member who can pass it on to the relatives. Wherever you make your gift, proper etiquette allows for mentioning the donation in a card to the family without mentioning a specific amount.