Practice, practice, practice.
My favorite exercise was given to me by Heath Ryan. He put a pole in the middle of the arena and had us canter up over it, focusing on getting the perfect distance every time. He had another, similar exercise that was pretty difficult. There were three poles at bounce distance (9 ft) apart leading up to a 5-bounce gymnastic. If you got the distance to that very first pole, chances were your horse would get through the line perfectly, if you didn't get the right distance, you were more likely to fumble through the whole line and pull rails.
Really, it's all about perfecting your eye. If you get a chance, I suggest hopping on other horses and jumping a bit too. Just because you can find a distance on one horse doesn't mean you can on them all! The more flexible you learn to be with your eye, the better you'll be at finding distances.
"Always be yourself. Unless you can be a unicorn. Then, always be a unicorn."