It depends on the type of game it is.
Ideally, however, it should be virtually infinite. I don't mind linear games with scripted events if the events in question and if the story are good, but if such games have official editors to screw around with, if such games have a dedicated community to modify its content as they see fit, if such games can be replayed virtually infinitely due to those community's creations then that's my "ideal" length for a game. Well, it still depends on the type of game... I mean I wouldn't want a game like World of Goo to last 80+ hours, there are games meant to be short and it's fine that way, there are "casual" games out there that are entirely good the way they are, simple, to the point, in which you can just relax, take a coffee and enjoy a short game-play session and end up finishing such games under two or three days, that's fine too.
But generally speaking as far as 3D games are concerned (adventure, action, 3rd-person, whatever has a story and a single-player campaign or something along those lines) I want at least a week worth of play before I can finish them if nothing else happens after the end (I.E if the game cannot be modified whatsoever and just takes up to the dust on my desk after I finish it one or two times), which I guess means that I need a game to last at least around 50 hours to be satisfied in such cases, but as I said if I had to chose the "ideal" length then it couldn't be measured in mere hours, it'd be measured in years (if I take Diablo II for example, I played it for seven years, or Oblivion which I've played for a good three years, games like that, there's only a few here and there, I can count them on the fingers of both hands, and I started playing games on the original NES).