While no one is entirely sure when cricket was first invented or played as a popular sport, it was most likely during the Dark Ages before the Norman invasion of England (for those of us who can't remember our Normans from our Nordstroms, that was in the mid-11th century).
While most cricket or baseball enthusiasts would be leery to see the games as an influence or precursor to each other, there's no question about the similarities. There is a pitcher (bowler, in cricket parlance) who throws the ball to a batter (or striker, to our wicket-loving friends). The striker attempts to hit the thrown ball, and if he or she does, each batsman can score runs by completing a kind of circuit.
Undoubtedly, that's an incredibly simplistic -- and entirely too brief -- explanation of an extremely complicated game. But you can see that some of the fundamentals are shared, and cricket is so popular that it's hard to imagine that whoever was dreaming up baseball wouldn't have taken a pointer or two from the game. At the very least, it can be argued that if the American pastime didn't evolve directly from cricket, they both could've been influenced by a shared, older folk game.