While dolphin diving, there is a 3-frame window as Zora Link surfaces during which a B press while still holding down will cause Link to hang midair for a moment. Pressing B on the middle frame can give a good amount of height depending on the angle of the dolphin dives. While hanging midair, Link can grab high ledges that are too high to grab directly from the water or dolphin dive onto. It is often a good idea to switch to holding up after pressing B to make Link move forwards towards the ledge.
It is also possible to get a high ledge grab immediately after diving into water without chaining any dolphin dives, but there is only a 1-frame window for the B press in this case.