Krillin's death is the trigger. Watching his friend killed in front of him pushes Goku past his limit during the fight with Frieza, and the transformation happens there — the moment the whole series had been building toward.
It's worth noting that the anime and manga place it at slightly different beats within that battle, but the cause is the same in both: grief and rage, not training.