Western animators discovered early on that five fingers were hard to draw and animate. Try it yourself sometime; it’s hard to simplify hands with four fingers and a thumb without making the palms look too wide or the fingers too small to animate easily (minus in close-ups). If you’re making your characters look round and simplified, three fingers is the way to go. Since then, I think it’s just become kind of tradition.
Of course, if you look at Disney feature films, the number of fingers on the character seems to have to do with what sort of “look” they were going for. In Snow White you’ll notice that Snow White has 5 fingers, but the dwarfs have four. That’s probably because Snow White was more of a graceful, beautiful character that was meant to look very human, whereas the dwarfs were more for comedic relief. Similarly, in Cinderella, Cinderella has five fingers and the mice have four. As @Jeruba noted, most non-human characters have four fingers.
In Japanese animation, early anime followed Western examples and gave their characters simplified forms, large eyes and four fingers. Astro Boy, which came out in the early 50’s, was originally drawn with three fingers or sometimes even one big mitten. However, by the 60’s it became most common to have him depicted with five fingers, although he does seem to have much larger hands with all five.
Since the mid 70’s, it’s become standard for anime characters to have five fingers, although you will sill find contemporary children’s anime like Anpanman with three (or, in this case, no) fingers.
Hope this explains some for you. :)