They may both be translated as "lightning", but don't mean exactly the same. Piorun is a general term for an electrical discharge in the atmosphere, błyskawica refers only to piorun's visual effect.
So talking about an accident we might say "Zenka trafił piorun", but "Zenka trafiła błyskawica" would sound somewhat odd. On the other hand, when watching a thunderstorm, we'd rather say "patrz, jakie błyskawice" than "patrz, jakie pioruny."