***WARNING: GEEKY HISTORY BELOW***
At the end of Metroid 2, after successfully exterminating every Metroid (including their queen) on SR-388, Samus found a hatchling Metroid. The hatchling thought Samus its mother, and Samus couldn't bring herself to destroy it so she brought the hatchling to Ceres space station for Federation research.
This sets the events for Super Metroid, in which Ridley attacks Ceres station and steals the hatchling for Mother Brain, who sets the baby loose in Tourian to feast on the most powerful enemies in the game. Samus encounters Metroids again on her way to defeat Mother Brain. The Metroids must have been cloned from the baby Metroid, and are weak to the normal method of freeze and blast with a missile. The baby Metroid however, has grown 3-4 times the size of normal Metroids and is apparently invulnerable to Samus' weapons. The baby attacks Samus and drains her within 1 energy unit of death when it stops, presumably recognizing Samus.
A quick recharge later, Samus finally confronts Mother Brain in 2 forms, and it struck down by a devastating beam of energy from Mother Brain's eye. As Samus lies on the ground struggling to get back up, the baby Metroid swoops in to save Samus from Mother Brain, draining Mother Brain of almost all her energy. The baby then attaches itself to Samus, recharging her with the stolen energy. Mother Brain must have had a reserve, because she recovers and begins to assault Samus and the baby Metroid. The baby, weakened by recharging Samus and the attacks from Mother Brain, falls victim to Mother Brains attacks and dies. It is unclear what happens next. Either the stolen energy from Mother Brain or the baby Metroid's dying act causes Samus' acquired beam weapons to merge into the Hyper Beam, which Samus then uses to defeat Mother Brain.
The Hyper Beam makes short work of Mother Brain, impassable barricade doors, even Elite Space Pirates. It makes a reappearance in Metroid Prime, in the final boss fight. In addition, Metroid Prime 3 introduces a suit that can inject an energy tank into the weapon's system causing Samus to go into Hyper Mode.