Route 31 is a small route that serves to connect Route 30 in the south and Violet in the west. The western entrance to Dark Cave is also located here, but you won't be able to get very far yet. Pick up the Potion near the cave and continue west. You can pick a Bitter Berry off the tree by the pond, and find a Poké Ball south of the nearby ledge.
Once you have gained HM05 (Flash) and the Zephyr Badge you can have one of your Pokémon use Flash in Dark Cave, lighting up the area. For now you will only be able to explore the western area of the cave; in order to progress further you will need TM08 (Rock Smash).
The kid in the house near the Poké Center is looking for a Bellsprout. If you have an extra, it's a good idea to trade it to him. The Onix you get in return can make the Gym battle here much easier.
Earl's Pokémon Academy
The Academy is where young prospective Trainers learn how to raise Pokémon. On the blackboard are descriptions of the several status problems that can affect a Pokémon.
The Sprout Tower is a towering pagoda run by Buddhist monks. Since these monks also train Pokémon, this is a good opportunity to train before challenging the Violet Gym. Bellsprout and Rattata make their home in the tower, and Gastly can be found here at night as well. After battling past the other monks, you'll run into your rival after he has just defeated the head monk. He talks to you briefly before using an Escape Rope. After defeating the final of the seven monks, you will be rewarded with HM05 (Flash).
Professor Elm calls you as soon as you leave the Gym, asking you to visit his assistant in Violet's Poké Center. Talk to him to receive the Mystery Egg, since it has to be around an active team of Pokémon to grow and hatch. Call the professor when it finally hatches, and he'll ask you bring it to him. After he inspects your new baby Pokémon, he'll give you an Everstone as thanks.
With the Violet Gym defeated, head south to Route 32.