Upvoting a post releases the Good Chemicals in the brain. You do this when you would like the person who made this contribution to do more of that.
Downvoting, in turn, produces the Bad CHemicals. The downvote button was famously invented to replace the previous disincentivizing mehchanism, Hammers.