The blue Lightning Crystal is an elite variant of the Laser Crystal enemy. It constantly emits rails of lightning when idle, and moves slowly in random directions (albeit faster than their non-elite counterparts)
Turns red and fires several arcs of red lightning in your direction when approached. Lightning rails create an electrocution visual effect, but do not do damage in line with the animation. A single red lightning rail does 2 damage every 6 frames. This damage does not stack, meaning that you will only take damage from one lightning rail (2-4 damage in total), even if hit by multiple rails.
Lightning Crystals are intended to be the Elite variant of Laser Crystals, spawning under similar conditions as Snow Tanks and Golden Snow Tanks. However, this can only happen on area 4-2 due to an error in the code, which cannot be reached in normal gameplay.