According to Wikipedia:
"[Pikachu] are said to store electricity in their cheeks, and by simply squeezing them they can discharge sparks, lightning bolts, or other forms of electricity. Discharging sparks and thunderbolts may be a sign of wariness from the Pokémon. An inability to discharge electricity, as occurs in the presence of a strong magnetic field, causes an illness with flu-like symptoms. Pikachu tend to gather in areas with high amounts of thunderstorm activity. When threatened, a group of Pikachu can generate an intense electrical output, and the electro-magnetic forces exerted by the resulting field can even produce short-lived, localized thunder and lightning storms. They occasionally use an electric shock to recharge a fellow Pikachu that is in a weakened state."
via Luke at MLMB