Ignition and extinction of homogeneous energetic materials by a light pulse