When electricity passes through thin wire of high resistance then light is produced. This is called lightening effect of electricity. For example: electric bulbs, fluorescent lamps, etc.
In a photo, the lighting effects are the way the sun, shade, etc causes the photo to appear. A single flashgun can produce many different lighting effects. The best lighting effects are seen when the camera is pointed towards the sun.
Lightning is an electric current. Within a thundercloud way up in the sky, many small bits of ice (frozen raindrops) bump into each other as they move around in the air. All of those collisions create an electric charge. After a while, the whole cloud fills up with electrical charges.