When does the ATC assign runways to aircraft arriving at an airport?
While exact distances &amp; times vary depending on which airport and what runway configuration you're working with, the most reliable answer to the question is, usually on initial contact with the Approach controller.
As an example, here is the SITTH2 RNAV arrival into Atlanta (pdf link):

Inbound to ATL, you'll be cleared for that arrival, and you'll know that regardless of the runway assignment, you can plan to cross SITTH at or above 14,000' and TIZZY at 12,000'.  But as far as runway assignment, you're making a best guess.  Coming in from the southeast like this, the farthest south runway in ATL, runway 10, would be a fair guess, or the outboard of the 9/27 runways (so, 9R -- since they tend to arrive on the outboards, 9R/27L and 8L/26R, and depart on the inboards) if traffic is light. (Airport Diagram for ATL)  But that's not certain until you're talked to Atlanta Approach.
The approach control is the facility that builds the plan to distribute the inbound aircraft (which they can see hundreds of miles out, along with projections when each one will arrive at the &quot;cornerpost&quot; like TIZZY), and they'll have the plan that Delta 123 will get runway 10, Delta 456 will get 9R, American 789 will get 10, and Spirit 987 will get 8L.  And so on initial contact with Approach, the crew will be told, typically, to &quot;Descend via the SITTH2, runway 9R&quot;.  At this point, the crew can update (if necessary) the runway in the FMC, review the approach for that runway, and check that the points in the FMC match what the chart shows  (i.e. after TIZZY, going to FRYES and following points for 9R or 10, or to GAASS etc for 8L).
It's not impossible, but it's uncommon for Approach to subsequently change the runway after this, although a crew can always ask.  (The exception to this is Denver; they seem to rebuild their plans every few minutes.)  If there isn't a lot of traffic, ATC may be able to accommodate a crew's request.  In ATL, there isn't a big difference getting to the gate from the north or the south complex; at DFW, it can be a significantly longer taxi, so there are more requests there for &quot;request east side if we can&quot; to try to get a runway corresponding to the terminal where they're parking.
Once the aircraft is on with Tower, it can be possible to switch runways; this is very dependent on traffic and happens only in visual conditions.  This would mostly be swapping to an inboard from an outboard runway, rather than from a north-complex to the south-complex (or vice-versa).  Atlanta doesn't do this much; in Phoenix, it's pretty common, since the inboard runway on the south side of the airport (25R / 7L) is closer to the south-side gates &amp; doesn't involve crossing a runway to get there, as compared to the outboard runway (25L / 7R, which is typically assigned for inbounds to PHX from the south).  If Tower doesn't have anybody getting close to the inboard runway for takeoff, they may offer it to somebody on final.  And the crew can ask -- although if there's somebody who's approaching the runway for takeoff, the answer is likely to be &quot;no.&quot;