Part of plotting a session is trying to figure out when you will call it a day. Eventually time runs out and we need to take a break. However, we also want the sessions to be fun and interesting. This is why it is so hard and so much of a skill. Balancing interesting things, and allowing players the chances to do what they wish within a defined time is tough. It's made even tougher by the nature of role-playing games: things often don't go as planned. Hopefully my thoughts on the matter will be useful and as always, I'm happy to hear other opinions.
Too Short Better Than Too Long
I am of the opinion that running too short is better than running too long in most cases. There are some exceptions that immediately come to mind, but the good thing about running short is that it means you still got through what you had planned. This usually means that there isn't much of a risk of a dead session where nothing happened. Some sessions will naturally be more interesting than others, but something happening is better than nothing. Of course, things could have gone off track but full of interesting events. My group also tends to have strictly timed sessions because of other commitments so I have this opinion by necessity.
What happens if we get through everything we planned? We could of course keep going and in many cases, I'd say this is the correct choice. We have the time so let's use it and continue in the story. The risk we run into is pacing and structure issues. Jumping into a half completed segments, combat encounters especially, can be rough. If we know that we only have 20 minutes left, it may be a good idea to break early instead of expecting everyone to jump right back into a half finished encounter. We could also end up ending on a low note after a tough and engaging combat encounter. In practice, I'm not really worried about this option. I find players often appreciate some breathing time after and to reflect on what happened. Still though, it should progress even if slowly. Some extra time at the end is also perfect if you plan to do a session postmortem.
When Is it Better To Run Longer?
There is also the option of running the session a bit longer sometimes. It will depend on who you have. It could be the only thing they have left for the day so whether they leave at 11pm or 11:20 doesn't matter as long as it ends reasonably close. In these cases, the right choice might be to just do the encounter and end on the high note. We'll run long but we can afford it. It is also sometimes a good idea to let your players know the session will run longer if you know ahead of time. This is especially true for the end of a campaign. If you normally have sessions that run 2-3 hours, it might be a good idea to run a longer 4 hour session and finish everything in one chunk. That way everything is fresh and rolls together well.
Why Are Breaks Bad?
It's been my experience that sessions tend to be scheduled weekly or by-weekly for groups. A week or two are perfect amounts of time to forget things and even with experienced groups, it can take a little bit of time to file the rust off and continue. I find it's somewhere in the 10-15 minute range. For this reason, starting a session in a half-completed combat encounter doesn't generally work the best. If you are using digital tools, it's less of a concern because the map will be untouched. Physical maps and miniatures need to be put away unless you don't need that table for 2 weeks. Sometimes it's unavoidable. I found my players prefer ending a bit early and starting the combat encounter next time. Some combat encounters can be very large and ornate, and in those it's more reasonable to find a logical spot to stop and commence. If the fight takes place in a tower where floors are breaking, stopping just as they fell to the final floor is better a less defined and memorable situation. And obviously the longer the time span between sessions, the worse it is.
Play Until Done
I've played in sessions where the target was about 2 hours, but everyone would stay until it was done. As a result things would often run long (3 hours, and once 4 hours) but each session felt like a complete experience. This worked great for this group, but not everyone has that kind of flexibility and out-of-game factors overrule the game in these cases. But man, is it satisfying to spend a most of a day playing a tabletop game.