You want letters ideally in before Sep 15th which is when ERAS allows programs to download residency applications and start sending out interview invitations.
That being said you can submit letters up to Nov 1st I think, although I personally would get them in as early as possible.