Do build up to it
There are few things worse in gaming than being unceremoniously dropped into a boss fight you've had no chance to prepare for. At best, it's confusing. At worst, it can feel like a lazy, jarring excuse to increase the difficulty just for the sake of it, with no attempt to weave the battle into the fiction of the game, or no attempt to build up the suspense beforehand. But with even just a few minutes of introduction, a previously inexplicable boss battle can be transformed into something remarkable.
Star pupil: Half-life
Half-Life had a few boss fights, and if we're honest we'd probably have to concede that not all of them were brilliant. But your tip-toed fight against the tentacle monster, midway through the game, saw Valve's debut at its best. As soon as you enter its vicinity, you can hear the blind, three-headed beast clanking its beak against the metalwork. Soon after, you get a real sense of what this frightening thing is capable of as it drags a scientist through a glass window. It's only then that you get to set about solving the puzzle that leads to its fiery demise - and by that point, you're already utterly terrified.
Don't have the boss "win" in a cutscene
Sometimes it's dramatic, in a story, to make it look like the bad guy is going to emerge victorious. The hero gets struck to the flaw, the villain about to strike the final blow, when a friend comes along and saves the day. But these are computer games. They're supposed to make us feel like the hero - and it's not nice to have someone else save the day, especially when that health bar told us we were on the front foot!
Worst offender: Zeno Clash
No, Zeno Clash. Look, I understand. I really do. You want to make these encounters tense, and you want an excuse to be able to bring the same boss back at a later point. I get that. But why, when I've obviously just run down this guy's health bar to zero, do you feel it okay to then show a pre-rendered animation of me getting my bottom kicked? I was winning! It was going fine! Stop being so ridiculous.
Do think outside the box
Ultimately, boss fights are tired things. They've all been done before. There have been bigger bosses, dear developer. There have been more ferocious ones, and there have been better weapons to kill them in the face with. The absolute best thing you can do is make a boss fight that isn't really a boss fight. Be creative. We're desperate for it.
Star pupil: Portal
Your eventual confrontation with GLaDOS, the dreadful, malevolent AI who's been taunting you throughout the game, is a fantastic moment. It isn't by any stretch the game's biggest challenge. There's no combat involved. You simply have to use the basic skills you learned a few hours ago to dismantle this pile of metal and wires, and chuck her, bit by bit, into a furnace. It helps that the writing is hilarious, admittedly, but the concept alone is brilliant. Valve are good at this stuff, as evidenced by the finale of Portal 2, which it's probably a bit too soon to talk about yet. Otherwise, here, we'd be going on about the awesome bit where--[CENSORED.]