Light is an important element when you are taking a phot—this affects the brightness and the focus of the photo. For a digital camera, what it does is the pre-filtrate the light.
What is meant by this? It is actually a technique to filter the level and nature of the light before you actually take the photo shot so that you can adjust the brightness you want. In this way, you will be able to create photos that is more beautiful irrespective of what the environment is like.
These are basically all the important principles of how the digital camera works.