In Crash Bandicoot 2, the firefly aids Crash in the levels Night Fight and Totally Fly. They will guide Crash through the dark jungle path for a brief moment of time, but will abandon him after a certain amount of time has been spent. Once Crash loses a firefly, he is on his own to navigate through the dark, until he comes across another firefly. This means that he must avoid certain enemies and pits that he will not be able to see in the dark without their help. The fireflies also appear in the bonus round of these stages, acting as a temporary guide until Crash completes the stage.
The fireflies return in Crash Bandicoot 3: Warped, where they will guide Crash through an ancient dark pyramid in the level Bug Lite. They act the same way as the fireflies in Crash Bandicoot 2, where they will temporarily illuminate the dark path for Crash until he comes across another firefly.
In Crash Bandicoot: The Wrath of Cortex there is a firefly in Knight Time, although this one is different than the ones in previous games. Instead of white, this bug is yellow and it also doesn't abandon the character (in this case Coco), it's also much larger and its bulb is more spherical. It lights up the path until the end of the level.