They are very bright cockpit flood lights, used at night or in poor lighting to bring your eyes' sensitivity to near daylight levels when flying in the viscinity of electrical storms. This prevents you from becoming blinded by nearby lightning flashes, which would be the case if you had allowed your eyes to becoming 'night acclimatised'.
Personally, if the lightning is that close I have my eyes shut anyway......