Todays vehicles use many sensor, switches, solenoids, and other electrical components to control or monitor every aspect of the engine. From controlling the fuel and ignition systems, to monitoring the emissions. A problem in any of these systems, or subsystems, can cause the check engine light to come on.
The first step in any diagnosis of the check engine light is to get the computer (PCM or ECM) scanned for codes. Any time this warning comes on, a code is stored in the computer memory along with many data parameters that were present at the time of the fault.
A simple code reader that can be purchased at any automotive supplier can retrieve these codes. Many of the large national parts store chains will scan the system at no charge. The code will give an indication as to what system has / had a problem. The more expensive scanners will also show live data, and allow further diagnosis by being able to control parts of a particular system.