Boss battles serve a lot of functions in videogames. They are a means of providing a gameplay experience that can't be found elsewhere in the game. They can serve as checkpoints to ensure that they player has built up his characters' stats or developed his own skills to the necessary degree in order to tackle future challenges. However, perhaps the most important function of a boss fight is to serve as the dramatic climax to a section of gameplay. A boss fight that is too short, easy, long, or boring can destroy the dramatic build up and leave the player disappointed with the game experience.
First off, a major boss fight shouldn't die too easily. If the player ends up killing a boss in only a few attacks, the entire boss fight will feel anticlimactic. One recent example that comes to mind is the final battle against Kefka in Final Fantasy VI. When my brother finally made it to Kefka's final form, Kefka began to dramatically charge up a powerful attack, only to die before executing it even once. That victory felt too hollow, and I was pretty disappointed by it. I am not saying that every boss in a game needs to be nail-bitingly hard, but they shouldn't be too short. At the very least, a boss should last long enough to show off its abilities and make the player feel like he has to work to defeat it. If Kefka had possessed the same stats as normal but had two or three times the number of hit-points, it probably would have been a much more exciting boss fight.
Conversely, a boss fight should not be too long. If the player is stuck fighting a boss for half an hour or more, he may end up forgetting about all of the build up and anticipation and end up bored or frustrated. A good example of this is the battle against Anubis in Zone of the Enders: The Second Runner. When fighting Anubis, the player alternates between long periods of dodging and waiting and very brief opportunities to attack Anubis. While this is not necessarily bad in of itself, Anubis has an incredible amount of health; more than enough to absorb a few dozen attack combos. What this means is that the player has to repeat the same maneuvers again and again and again over the course of a really long period of time, which is simply boring. The fight would have been much more exciting if Anubis had half of his current health or less, balanced by an increased power level.
Striking a careful balance in terms of a battle's length and difficulty is a difficult process, However, there are ways to maintain a boss battle's dramatic tension, or even to build tension, within the boss battle itself. If a boss is constantly changing attack patterns and evolving its strategy as the fight progresses, the player will remain engaged and excited. This can be further enhanced by having dialogue and short plot-sequences intermixed with the boss battle. A great example of these devices in action is the final showdown with Ganondorf at the end of The Legend of Zelda: The Wind Waker. As the fight progresses, Ganondorf slowly figures out Link's fighting style and starts blocking attacks that worked earlier in the fight, forcing the player to come up with new strategies of his own. The battle pretty comes in three phases, starting with Zelda giving Link some assistance using the Light Arrow, then a phase where Zelda is knocked out cold and Link has to fight on his own, and finally moving on to a phase where Link a Zelda have devised a strategy of bouncing Light Arrows off of Link's Mirror Shield. In a sense, the boss battle has a story in of itself that progresses as the battle progresses. By making a boss battle into an evolving story, the scene remains dramatic, even if the battle itself is fairly lengthy.
In the end, I think it is safer to lean on the side of a longer boss battle, but to spice up boss battles with evolving elements and some degree of internal story. That way, one can avoid the problem of a boss battle being anticlimactic or boring.