Your creature is found in the Lords of Madness supplement, p. 171 and is called the zeugalak.
it has a gliding speed
Feather Fall (Su): At will, a zeugalak can use a feather fall
effect (as the spell, caster level 16th) with personal range.
immunity to electric damage
Electrical Affinity (Su): A zeugalak takes no damage
from electricity. [...]
and when hit by electric damage could teleport to its source
Electrical Teleportation (Su): If a zeugalak gains points to
its Dexterity from an electricity-based attack, it can instantly
teleport (as the spell greater teleport) to the source of the electrical
This resulted in its habit of seeking high places during thunderstorms, so it could be hit by lightning, teleport into the clouds and enjoy the ride home.
Zeugalaks are especially active during thunderstorms, and cavort atop mountain peaks during such weather. Their terrible bellows of delight when they are struck by bolts of lightning can carry for miles. When struck, they use their electrical teleportation ability to teleport high into the clouds above so they can enjoy the long feather fall back to the ground below through the surrounding storm.