The best selection on-line and in-store is usually 2-3 months before your Prom. You may find slightly better pricing just before your prom, but there will be less selection.
When shopping in a physical store, the closer it is to Prom the more likely your dress has been tried on and possibly damaged such as missing beads/sequins, stressed seams, stressed zippers, dirty hem. Inspect the dress while you are wearing it and after taking it off. The store is likely to offer a discount or have the dress repaired if you point out any flaws or damage. If the store asks about your event and actually restricts “playing dress up” then your dress will be better cared for before you buy it and far less likely to have any damage or wear.
For special orders, or on-line shopping, if they ask for the date of your Prom, tell them it is 2 weeks before your actual prom date. On-line retailers will sell dresses that are not actually in their possession, or even made! They are gambling on the hope that the dress will be sewn & shipped prior to your big day. Even if the store shows a dress is “in-stock” that does not necessarily mean YOUR dress (size & color) are actually in their inventory.
If buying on-line, double check the item description, size charts, and return/refund policy. You are more likely to actually get the dress you order if the dress is already in stock. If the website states 6-8 weeks delivery (or more), then they probably do not have actual possession of your dress and you should avoid ordering from them. Many girls came into my store to buy dresses the week of (and sometimes day before) Prom, because they ordered a dress on-line and it A) Never arrived, B) Wrong size or fit, C) it was not the dress they ordered, D) it arrived damaged.