Modern engines run by using a number of specialized sensors such as Air Fuel Ratio Sensor or O2 Sensor units. While the air flow in an engine is extremely important there are other factors that need to be measured such as the position of all the parts of the motor at any given time. The way this info is calculated is through sensors such as the crank angle sensor and the cam angle sensor. These units measure where the rotation angle of the crank and the cam shafts respectively. The cams and the crank must be kept in specific positions to each other since if they are not the valves will be smashed by the pistons.
The ECM controls the engine and if it detects that the cams and the crank are not in the specific location it will retard the timing or kill the engine all together. The ECM will do this to protect the motor from damage, if the timing gets too far off it can potentially damage the engine internally.
Timing also dictates how much horsepower the engine makes and how the fuel is burned. If these sensors fail the combustion of the engine can get all out of whack which is potentially dangerous. Besides the fact that the pistons can impact the valves there is the factor of detonation. This occurs when the fuel mixture is wrong and the explosion in the cylinder is not in the correct location and it takes place faster than it should. There are some instances where the combustion of the fuel takes place to quickly and in a specific location on the cylinder wall which will cause damage to the block itself. This detonation can even cause holes in the block or melting of the pistons. For all modern cars it is a good idea to check all these sensors when the car is in for service. They do play a pretty major factor in the life of a vehicles motor.