I get this question a lot. And my answer? It depends (yeah I know, not very helpful!).
My rule of thumb is:
For small and intimate gatherings with up to 25 people, 8 weeks can suffice if you have an audience who are keen to work with you.
For workshops, seminars or anything with up to 100 people in the room and priced under $150 is about 12 weeks.
For events where you want more than 100 people in attendance or premium events with a higher ticketing cost, I would start promotion even up to 5 months in advance. This doesn't mean you have to sell tickets that early on, but it does mean warming people up to the idea through Save the Date's, teasers and newsletter or social media mentions.
Here are a few things to consider when thinking about when to open ticket sales: