Forget general advice about always buying on Tuesdays or always buying 6-8 weeks before you want to fly. Instead, use Hopper. Punch in the airport you want to go from and the one you want to go to. Then instantly see a really gorgeously detailed report that tells you exactly when to buy and when to go.
Hopper’s data is gathered via crowdsourcing so it is continually updating which means it is continually changing. So strictly speaking what you see is exactly the time to buy and the time to go as it appears now. But that is pretty good.