Good lighting benefits both fish and plants. Good lighting means of sufficient intensity and of sufficient quality. Light quality is measured by its colour temperature in degrees Kelvin. It is basically a measure of the warmth of the light. 3500 Kelvin is a warm reddish light, 5000 Kelvin is similar to the light quality coming from the sun and 6000 Kelvin would be much hotter and at the blue end of the spectrum.
It is important to restrict the number of hours of light because your fish need rest periods. The amount of light that you provide depends upon whether your tank only contains fish or is planted as well. For a fish only tank somewhere around 6 to 12 hours of lighting should be adequate. A planted tank on the other hand requires somewhere between 10 and 12 hours a day of lighting. Any longer will promote algae growth, raise the tank temperature and produce greater evaporation of the tank water.
A few years ago the only option was one or more incandescent bulbs. Now there are many other options ranging from regular fluorescent lights through compact, high output, very high output fluorescent tubes and now there are LED aquarium lights.
As a rule of thumb a fish only aquarium will be fine with a regular T12 or T8 fluorescent tube somewhere around 15 to 40 W. The only thing you need to remember is that you need to change the tube every year because the light quality does deteriorate with age. As I said with a planted aquarium the lighting needs to be upgraded and it does depend upon the depth of the tank, the species of plants you choose and the desired growth rate. If you are using fluorescent tubes you need roughly 2 to 5 W per gallon and a colour temperature somewhere between 5500 and 6700 Kelvin. Generally speaking one or more T5 tubes should suffice. Remember to change the tube regularly every six months.
You can easily tell when you don't have enough light because your plants will be suffering. If the leaves become pale green or even yellow, have weak stems, few leaves and there is diatom algae around then you definitely need to up the lighting intensity. More specifically tall leggy plants means that the lighting colour temperature is too low in other words too red on the other hand low squat growth means that there is too much blue. Stunted growth means there is too much green and yellow.