When we connect a heater coil to an electric circuit then according to "joules law of heating effect" due to its resistance it will produce thermal energy . My question is why light is accompanied with it... Is there any relation between collision between ions and electrons with the emission of light?
The interactions/collisions between the free/mobile electrons and the lattice ions/atoms/molecules cause them to vibrate.
Ions/atoms/molecules are complicated arrangements of electric charge.
When an (unbound) electric charge accelerates it will emit electromagnetic radiation.
The range and intensity of wavelengths/frequencies of the emitted electromagnetic radiation depends on the degree of vibration which in turn is related to temperature.
This is shown in the graph below where intensity is plotted against wavelength of emitted radiation.
As the temperature increases average energy of the emitted photons increases so a body at around room temperature emits infra-red radiation whereas an incandescent light bulb produces some radiation in the visible part of the spectrum.
The higher the temperature perhaps produce by a larger current, the greater the vibrations of the ions/atoms/molecules resulting from the interaction between the mobile electrons producing the emission of a greater proportion of more energetic photons.