There wasn't a sudden change from one to the other and ring halos above the head appeared in art from time to time over several centuries. What happened first was that the traditional halo went into decline in the late middle ages because artists wanted more realism and flexibility. So the traditional halo behind the head either became a disc above the head, or a ring, or it just disappeared (depending on the artist). The Wikipedia page on Halo (religious iconography) gives some details about different artists and what they did.
Here are some examples of how halos evolved. The first one is Masaccio (1401–1428)
This one below is Leonardo da Vinci (1452–1519), transparent halo.
This next one below is maybe St Jude, maybe 17th or 18th century.
According to Wikipedia,
By the 19th century haloes have become unusual in Western mainstream art, although retained in iconic and popular images, and sometimes as a medievalising effect. When John Millais gives his otherwise realist St Stephen (1895) a ring halo, it seems rather surprising. In popular graphic culture, a simple ring has become the predominant representation of a halo since at least the late 19th century, as seen for example in the logo for the Simon Templar ("The Saint") series of novels and other adaptations.
Here's an 1889 Gaugin self-portrait