Where to find the leader: At the moment, he is not in the gym because he has lost interest in battle, but there is a way to bring him back. You need to go up a flight of stairs, follow the road until you find the lighthouse. (You'll know when you've found it because the entrance leads to an elevator instead of a room. The leader will be up there so after you talk to him you may go to the gym and talk to Flint. (One of the Elite Four who informed you of the leader's condition.) He will move out of the way and let you enter the gym.
When you enter you will notice a puzzle that is mandatory to solve so you can get to the leader. Step on the right green switch one time and step on the left green switch one time. Follow the path to battle the trainer and go to the next room. Remember, if you ever mess up with the sequence, you can always go to the previous room and come back for the gears to reset. Now, in the second room, step on the blue switch three times. Go up the stairs on the left side, follow the path and step on the blue switch once. Step on the green switch, go to the right side, and go up the stairs. Proceed to the third room. Step on the right red switch once, the left red switch once, and go up along the left side. Step on the green switch once twice and move over to the right side. Step on the blue switch once, go up, and then go all the way down. Step once on the first red switch you stepped on. Now go back up the right side to get to the Gym Leader. (Puzzle instructions by Pokemon Dream: http://pokedream.com/games/diamondpearl/walkthrough/17-sunyshore.php )