Unfortunately it all depends on the insurance company you want to go with. Some do require that you book within X number of days of placing the initial deposit in order to qualify for coverage for pre-existing conditions, others just say that in order to be covered a pre-existing medical condition must be stable for X number of days before the purchase date to be covered. Sometimes the rules depend on what kind of insurance you're buying - medical only or trip cancellation/interruption as well.
Personally, we are low risk and have no major medical issues, so we don't like to book too early - usually we wait until we know 100% that we aren't going to change our plans, but at least a month or two prior to any of our penalties would kick in if we had to cancel. If anything happened before we bought the insurance then we could still cancel and not lose any money, so I don't see much point in booking earlier.
I've never been asked to provide any documentation showing what expenses I am exactly covering with my trip insurance (ex. flight booking), so if you did want to book now, but didn't have your flight booked yet, you can probably still buy the insurance. You'd just need to know the inclusive dates you are travelling, and the full cost of anything that would be non-refundable - you could probably estimate flight costs from historical pricing.
Hope this helps,
Aby