How to do it
The way to extend Samus's grappling beam is press Z, then up, down, and up on the control pad, then Z again. Do this quickly, and Samus's grapple will extend to approximately 3 times its normal length. You can also home onto opponents by pressing L when you pull it out. Also, you need to press A or Z when the tip of the beam is over the enemy in order to grab your opponent.
Credits
Thanks to TyphlosionIsMe for figuring out the sequence of buttons.