Let's put it very simply: buy things that your receiver would buy for themselves. That might seem obvious, but it happens far less than we'd like. People tend to use gifts as jokes, encouragements to change one's ways, or to signal something about themselves rather than providing utility (or happiness) to the receiver.