It isn't instantaneous, just too fast for you to notice (unless using curly fluorescent bulbs).
The electrical energy travels through the wiring at about half the speed of light, so that doesn't take long. The biggest delay is the time needed to heat the filament in the bulb.