The purpose of a pilot light is to provide a small flame which lights the gas coming out of the main burner. You can commonly find it on older model furnaces and water heaters. However, most modern heaters use a piezoelectric spark to light the burner.