What motivates people to donate to charitable causes?

Charitable giving and other prosocial behaviors (e.g., gift giving, volunteering) are much like other behaviors: difficult to predict at the level of individuals. For example, one of the most famous studies of prosocial behavior involved seminary students who were approached by an infirm and disheveled man who needed help. Students who were late for a speech, versus on time, were less likely to stop and assist despite all their training related to service and charity. 
That said, one of the reasons our species has flourished is our profound capacity for giving. By helping and cooperating with our kin and neighbors we were able to survive and thrive despite the fact that, as a species, we aren’t the strongest or toughest. Charles Darwin, who most people narrowly associate with survival-of-the-fittest-based competition narratives of evolution, actually pointed to our sympathy, compassion, and empathy as vital to human flourishing. He said, “Those communities, which included the greatest number of the most sympathetic members, would flourish best, and rear the greatest number of offspring.” All of this is to say that being charitable, prosocial, and generous is the key to our very survival and thriving. 
 What obstacles or challenges stop us from giving to others?

Now, just because prosocial behavior is necessary for our species to thrive does not mean that we are automatically charitable—in fact, many things get in the way of our tendency to give to others. One of the biggest is a lack of interdependence with others. Remember, our general helpfulness allows us to survive in small communities, but the extent that you feel independent and separate from others will actually make it harder to give. In some of our prior research, we and others find that people with more personal resources (e.g., income, educational attainment) tend to be less compassionate and less prosocial, and we think this has to do with the increased independence and separation higher social class people feel in their environments: high levels of personal resources provide greater autonomy, freedom, and control of your own outcomes and as a result you are not as naturally beholden to the communities that the less fortunate depend upon.
Another related force is the segregation of our society. If communities, schools, and neighborhoods are segregated by race and social class, as they tend to be in America, then your tendencies to give will not extend to the communities and individuals you are separated from. This is one of the many reasons why an integrated, connected society is so important, and why efforts to extend charity to those outside your community are so vital.
 How can we encourage people to give more?

Giving is the backbone of our society, and I would argue that constant reminders of how important giving is to our collective flourishing are needed to encourage charity. Beyond the collective benefits, there are direct personal benefits to charity in that giving makes us feel happy, socially connected, and brings meaning to our lives. If you can, give generously during this holiday season!