There is typically not 1 "right time" for a walk-through unless repairs aren't completed until <48 hrs before closing.
Typically I recommend 24-48 hrs before closing for only minor revisions, while 5 days prior for major revisions from the home inspection or on new construction on an incomplete home.
With the timing of the walk-through, we are balancing the following: A. The closing date B. Your schedule
C. Your agent's schedule
D. An inspector's schedule (if using an inspector for it) E. The timing & magnitude of repairs completed, if applicable
F. The liability of time between when the walk-through occurs and when the home is closed.
G. Your timeline for move in
H. Seller/occupant move out timing
For a more in-depth analysis of walk-through timing, see my spreadsheet on the subject here.