There are various attacks in the Super Smash Bros. series that cause the electric effect. Targets hit by these attacks will be shocked and spark for a second or two. Electric attacks have other effects:
They multiply the freeze frames of an attack by 1.5x.[1][2] This multiplier only applies to the victim, not the attacker.
They do no damage to Yellow Pikmin, which will not flinch.
They are strengthened by Electric Attack stickers.
They are weakened by Electric Resistance stickers.
The majority of magic, energy, and PK attacks use the electric effect, though this is hardly universal. The electric effect can be confused with the paralyze effect, as the only common moves that can paralyze use electrical sound effects.
The playable characters' appearances when hit by electric attacks in Smash 64 where some of the characters get shocked with cartoon animations showing; this is the only game in the series to use such an easter egg.
In Super Smash Bros, characters hit by electric attacks will briefly flash black, with their skeleton visible. The exception is Samus, whose suitless shape is seen instead. Non-playable characters do not have this effect. Using AR codes can enable the player to play as a skeleton for an entire game.
In Melee, when Pikachu uses its back, up, or down throw on an opponent, it begins to spark immediately, without the "shock" being displayed when the move connects. This was fixed in Brawl, where they were given a neutral effect. This also happens to Pichu, with these attacks also being the only ones that don't cause recoil damage to it (besides dismissed Thunder).
When a character is hit by an electric attack in Brawl and they have high enough damage, the crowd doesn't make any sounds unless the electric attack in question happens to hit an opponent that has already been launched by another, non-electric attack.