After you find the gym leader in the Vista Lighthouse, you can challenge the Sunyshore Gym.
Battle Trainers
Walk onto the walkway and step on the green spot to rotate the gears. Go south to return to the southern platform, then go west and onto the walkway there, and step on the green spot on the left. Then you can go north and you will battle School Kid Tiera, who has a level 44 Pachirisu. You get 1056 Pokédollars for winning.
Go north through the door.
Go east and you can battle Guitarist Jerry, who has a level 44 Luxio. You get 1232 Pokédollars for winning.
Go back and step on and off of the blue spot on the walkway three times, until you can go to the right and walk south along the T-shaped walkway. Go south, then west to the stairs, and go north across the walkway there. In the northwest corner, you can battle School Kid Forrest, who has a level 44 Mr. Mime. You get 1056 Pokédollars for winning.
Go southeast and step on the blue spot, then go east and step on the green spot. Then go south, then east past the Guitarist (see above for the Guitarist's pokémon if you didn't battle already), then go north up the stairs. At the north end, you can battle Poké Kid Meghan, who has four level 41 Pikachu. You get 492 Pokédollars for winning.
Go north through the door.
To the east, you can battle Guitarist Lonnie, who has a level 44 Raichu. You get 1232 Pokédollars for winning.
Go north and step on the red spot, then go south, then west, and step on the red spot on the left. To the south, you can battle Ace Trainer Destiny, who has a level 44 Kadabra and a level 44 Raichu. You get 2816 Pokédollars for winning.
Go to the stairs to the left and go north. At the northwest corner, you can battle Guitarist Preston, who has a level 42 Luxio and a level 42 Bibarel. You get 1176 Pokédollars for winning.
Go east and step on the green spot twice. Then go east and step on the blue spot, then go north, then down the stairs on the right. You can battle Ace Trainer Zachery, who has a level 44 Steelix and a level 44 Medicham. You get 2816 Pokédollars for winning.
Then go southeast, and step on the southeast red spot once. Go south, then go to the stairs on the right and go north. Now you can walk across the walkways to reach Gym Leader Volkner.
Gym Leader Volkner
Volkner has a level 46 Raichu, a level 47 Ambipom, a level 47 Octillery, and a level 49 Luxray. You get 6076 Pokédollars for winning. You get the Beacon Badge, which unlocks the hidden move Waterfall in your Pokétch. Now, all pokémon will obey you. You will get the Stickers that Volkner uses, and some TM57s, which teach Charge Beam.
Go east and then south down the stairs, and go through the door there. Then go east and south, then west onto the walkway, then south and through the door. Then go south onto the walkway and step on the green spot three times. Then you can go south and leave the gym.
North of the Sticker Shop, talk to Jasmine and you will get some TM99s, which teach Waterfall, and unlock Waterfall in your Pokétch.
After that, use Surf in the water to the north to enter Route 223.