There is no timeframe. However, it is best to file the AC21 letter at the earliest to avoid having to file a Motion in the event the I-485 is denied because the sponsoring employer notified the USCIS as such. There could also be other complications and ramifications and these are best addressed through a personal appointment.