From Zelda Wiki, the Zelda encyclopedia
Ocarina of Time and Majora's Mask
In Ocarina of Time and Majora's Mask, carrots appear while riding Epona as a meter near the top of the screen. They are used to give a burst of speed, and refill gradually over time. The carrot meter consists of five carrots. Once the meter is out, Link cannot make Epona go any faster. The player must wait for the meter to replenish, which is at one carrot at a time.
In Twilight Princess, carrots are replaced by spurs.
Four Swords Adventures
In Four Swords Adventures, carrots can be collected to increase the speed of Link's horse. Obtaining a carrot without a horse will instantly grant Link a horse. This only appears in the Lon Lon Ranch area of The Field stage and the Tingle's Tower minigame Bucking Broncos.