This is because of spontaneous breakdown in case of iodides and bromides which have a lower bond-dissociation enthalpy as compared to fluorides and chlorides. This low enthalpy means that even at normal temperature or on exposure to sunlight, the halides (iodides and bromides) decompose to a certain extent forming free iodine and bromine, both of which are coloured and hence impart colour to the original halides.
This is because of the fact that in presence of light iodine and bromine absorbs light and excitation of the electron from the ground state to the excited state takes place which on returning back to the ground state radiates energy. This radiating energy comes under the visible region. Therefore they are co lured.