He wasn't just lucky. He knew because he had all the race results in the sports almanac. That's how he made his entire fortune.
7 seconds sound clip from the Back to the Future Part II movie soundboard.
You can hear this line at 00:53:50.743 in the Blu-ray version of the movie.
Quote context
[...]
- It's the top of Biff's cane. I mean, Old Biff from the future.
- Correct. It was in the time machine because Biff was in the time machine with the sports almanac.
- Look. It says right here that Biff made his first million betting on a horse race in 1958.
- Look at his pocket with a magnifying glass.
- Son of a bitch stole my idea. He must have been listening when I...
[...]