There is a close connection between the optical field as it is described by the electromagnetic field and a single photon. It is stated that a photon is a single excitation of the field. In that sense it inherits all the properties of that field. So, if the electromagnetic field is a single pulse that only exists for a short duration, then the same would be true for the photon. On the other hand, if the field is monochromatic then the single photon also has a single frequency, but that means it exists effectively for ever.
This may sound contradictory to the fact that one would observe the photon at a particular instant in time. However, that is a result of the measurement process and does not have anything to do with the photon's existence in the field.