Giving stock, instead of cash, as a donation can greatly benefit both parties. You will find that most charities, hospitals, schools and other nonprofit organizations will accept stock as a gift or donation.
If the stock has increased in value from the time of purchase, the owner can avoid paying the capital gains tax by donating the security to another party. When the security is being donated to a charitable organization, the total amount will still be eligible for a tax deduction. Since taxation is avoided on the stock donation, the giver will be able to make a larger donation.
For example, let's say you were looking to make a $1,000 donation to a charity. You could either give cash or donate stock. Let's assume that the you bought stock for a original purchase price of $700, but it is now worth $1,128.55. To make it simple, let's assume capital gains tax is 30% of the stock's appreciation. Selling the shares for cash would net about $1,000 after capital gains tax (1,128.55 - (1,128.55 - 700)*0.30). In this case, you should be indifferent between donating the entire stock or giving cash, as both choices will cost you $1,000. However, the charity can receive more benefit from a stock donation, as they will receive a gift valued at $1,128.55, instead of the $1,000 in cash.
For additional information on how to give stock as a gift, read Can I give stock as a gift?