We use subjunctive after "aguardar" and "esperar" (both meaning "wait for") when the verb that follows refers to a future event that was not still true at the time of waiting.
Here we can read:
Hay que prestar atención cuando el verbo principal es “esperar” o “aguardar”. En lugar de hasta puede utilizarse la siguiente estructura: ‘a + que + subjuntivo’. Lleva subjuntivo puesto que se ve en una perspectiva de futuro, al enfocarse desde el tiempo del verbo de la oración principal, y no como ocurre con “hasta”, donde la perspectiva se hace desde el propio hablante o momento en el que se habla:
Luis esperó a que fueran a recogerle. / Luis esperó hasta que fueron a recogerle.
(In many Spanish-speaking places, instead of IO "-le" the DO form "lo" would be used: Luis esperó a que fueran / esperó hasta que fueron a recogerLO.)
While in the first sentence there is no certainty as to the fact that he was picked up:
- Luis waited to be picked up / for them to pick him up (was he picked up?)
in the second sentence it is clear that he was:
- Luis waited until he was picked up (he was picked up)
Important note 1: This "aguardar" is related to the verb "esperar" meaning "wait", not to the verb "esperar" meaning "hope", which is always followed by subjunctive. The second "esperar" would take a "que"-clause, without "a":
- Luis esperó que fueran a recogerle/lo (Luis hoped he would be picked up) (Being a wish, "esperaba" would sound better: Luis esperaba que fueran a recogerle/lo)
Important note 2: In the example in question, where there is certainty that it would get dark, it is the grammatical form "a que" that determines the use of subjunctive:
- [...] el labrador aguardó a que fuese (= fuera) algo más de noche para que no viesen (= vieran) al molido hidalgo en tan mala caballería. (waited for it to get darker)
(The italics above are mine)
The sentence above refers to the wait preceding dusk.
Instead, with "hasta que" we use indicative because reference is made to the time that followed the wait:
- [...] el labrador aguardó hasta que fue algo más de noche (waited until it got darker)