In both games, Epona's Song is used to call Epona and to fill a bottle with Milk (if played while standing next to some cows). Also, it is required to call Epona so that Link can jump over the fence into the Great Bay area in Majora's Mask.
Ocarina of Time
As an adult, Link can pay Ingo to ride horses. If Link plays this song, Epona comes to him and lets Link ride her. Ingo challenges Link to a race for the price of 50 Rupees. If Link does not use Epona, it is impossible to win the race. After winning the race, Ingo is infuriated and bets Epona on a double-or-nothing re-match. Upon winning, Ingo locks Link inside the ranch. Link can use Epona to jump the fences to Hyrule Field.
If Link uses the Powder Keg to access Romani Ranch on the First Day, Romani tells Link that she is practicing to prepare to defend the ranch against beings she simply refers to as Them. Link is then offered an opportunity to ride Epona and practice shooting balloons. If Link manages to shoot all the balloons, Romani teaches Epona's Song to Link.
Link can also howl Epona's Song at the Horse Grass as a wolf.
How To Play It
In Ocarina of Time 3D, it is played as follows: A X Y A X Y