Grow lights are necessary and can be used for a variety of purposes but the most common use is to provide light to your plants.
Light is also required to trigger flowering and fruiting. Light is also important in helping the plant determine when it is time to produce seeds.