How far in advance you should book a trip depends on how flexible your schedule is. The more rigid your dates are, the longer in advance you need to arrange flights, hotels, and activities to ensure availability.
Those with flexible schedules can afford to be patient and look for last-minute deals, though this largely depends on the destination.