Depends on what you are applying for. Some specialties, like Gen Surg, have deadlines between October 15 and November 1 for NRMP applications. Obviously you need to have your letters in by then. Other specialties generally have later dates and specialties which use the SF Match may have totally different dates.
In general, if going through the NRMP October is about the latest you want your letters to ensure they will get uploaded to the ERAS server in time, but again, if program deadlines are later in your specialty of choice, you will have more time.