I've raised hamsters as a kid and we researched both thoroughly before deciding if we would get one for our kids.
Hamsters:
Nocturnal - sleep during the day, most active at dusk & dawn
When handled at the right time (ie night) can be friendly. Will bite if alarmed or awoken during the day.
Slower, shorter tail, larger pouch cheeks, cuter and more "pet" like.
Omnivores, will eat veggies, berries, nuts and insects that you feed it (as well as hamster food).
Messy in their cage, pee a lot. Frequent cage changes are necessary if you don't want to smell them.
Solitary.
Gerbils:
Diurnal - sleep & awaken every few hours around the clock.
If handled from a young age will not bite.
Fast, jumpers, long tail and pointy nose. More "rat" like in appearance.
Eat Gerbil food with an occasional treat - dried fruit, veggies, occasional seeds (sunflower), natural cereals. Avoid items with too much fat (ie nuts) or they will get diarrhea.
Are desert animals, pee much less than hamsters therefor have much "cleaner" cages.
Need to gnaw constantly, best suited for non plastic cages or they could eventually gnaw through.
Does better in pairs - make sure you get the same sex unless you want a rather large family!
Ideally if it is a childs pet, gerbils would be the better choice. Mainly because their cages are easier to manage and their sleeping habits would coincide with when the kids would be awake. They are also less prone to biting, especially if they are handled from a young age. Our issue with gerbils was the beady eyes and long tails... too rat like and creeped us out a little.
One of my hamsters we had growing up we actually renamed "Dog - the attack hamster" because it would bite us all the time. Even poking fingers into the cage it would nip you. Of course I didn't know I was waking the poor thing up and now don't blame it, but it certainly wasn't one of my favorite pets because it wasn't one we could play with.
Ultimately we decided on hermit crabs for our kids

which are also nocturnal. We see them out occasionally during the day and the kids love watching to see who's changed shells or messed up areas we've set up in the cage, but again not a cuddly pet (way more fun for me at night than the kids!). They are much neater and easier to care for than both rodent options.
