I think either would be good for a toddler. Hamsters are more entertaining, I think. I had both when I was younger. I have never been bitten by a guinea pig; I have been by a hamster, though, and it hurts!
You'd probably want to clean their pen at least once a week, especially in the summertime to keep the smell down and also flys are definitely attracted to their pens.
Be careful that they have a secure top to their cage, though, because they can make a mess and chew everything if they get out... I know from experience.
