When required,
the brain of the pikachu sends a signal through the nervous system to these
electrolytes, opening ions channels and reversing charge polarity,
causing an abrupt difference in electric potential.
The final effect is the generation of electric current, capable of going up to 100,000 Volts during its thunderbolt move.
Result : Opponent stupefied.
Water is better conductor than air
Most of animals that bioelectrogenic in nature are aquatic creatures ( electric eels, rays, cattlefish, etc ) . This is because water is a much better electrical conductor than air, therefore electrical signals signals can be transmitted through water.
This betters the chance for the organism to protect itself against predators. Pikachu is not aquatic because probably the writes didn’t want it be so – Poetic License ;P
More:
Some other pokemons that were also bioelectrogenic were:
Eelektrik and the Eelektross