Two totally different actors. Being a sucker for a good drama, I take Hanks more seriously. He was amazing in Saving Private Ryan though his performance was overshadowed by the revolutionary effects. Forrest Gump...I dunno, a little too gimmicky, a little too contrived for my taste. Hanks was excellent, but the story surrounding characters roles are just as important as the performance of the actor.
As for comedy...ah I wouldn't put my eggs all in Hank's basket there. Yea everybody mentions Big or Burbs or whatever, they're all movies from the 80s and he hasn't made a movie like that in the last decade (other than those movies with Meg Ryan (and Toy Story) which you guys are quick to hate anyway). Cruise, on the other hand, has humor in many of his roles that is much more modern. Little quirks show up in many of his movies and they entertain the audience. When I see Hanks try to be funny, I might giggle, but what I see is a normal man acting goofy. And goofy, to me, is cute (hence Toy Story), not funny.
As for action movies? Yea, obviously Cruise. The first mission impossible was part of 90's movie pop culture (until ID4). The second was wierd, but it wasn't Cruise's performance that brought it down. Imagine Tom Hanks wheeling a bike while firing an Uzi at that guy that looks like Antonio Banderas. Yea...I'd bust out laughing.
So Cruise is better in action and comedy roles (or has better comedic capacity) and Hanks is better in dramas. Hanks has had these movies: Big, Burbs, Philadelphia, Private Ryan, Gump, Cast Away, Road to Perdition and Apollo 13. Cruise has had Minority Report, Magnolia, A Few Good Men, Jerry Maguire, Mission Impossible, Eyes Wide Shut, Rain Man, Top Gun, Interview with the Vampire and Born on the Fourth of July.
Hanks has had more respectable and award winning roles, Cruise has had more popular and memorable roles.