Volkner was first referred to by Tower Tycoon Palmer in Challenging a Towering Figure!, saying that, after seeing his battling skills, Ash would be able to give Volkner "a shock."
Volkner first appeared in person in DP165. It was revealed in the episode that he had met up with Flint when they were younger and had become rivals and eventually good friends. After Volkner became a Gym Leader, he designed the walkways of Sunyshore City and other technological advancements for the city. He also designed the Sunyshore Tower which supplies electricity to the city.
However, he soon became bored with battling and resorted to giving free badges to Trainers. After witnessing Ash's battle with Flint, he became interested in battling again and decided to accept Ash's challenge for a Gym battle.
(Source: Bulbapedia)