i mean when the light go throw the prism it Deviates. At an angle and dissolves at the same time. Do prism atoms have anything to do with this? why it can't go directly in a straight line?
Light consists of quanta. These photons have two oszillating fields, an electric and a magnetic, both perpendicular to the direction of propagation. This is the key to the question, how light is redirected at the surface between two media as well as how the double slit experiment works.
The prisms surface contains surface electrons. These electrons interact with the field components of the photons. An evidence for this fact is the polarization of reflected photons on a mirror or another reflecting surface.
An incomming photon gets influenced by the interaction of the part of his fields near to the surface more as the photons opposite parts. The photon gets deflected towards the prism. Leaving the prism the inverse process takes place.
Last not least, infrared gets displaced in a different way as red, blue and so on. This has to do with the energy content of photons with different wavelength.
As you guess right, the displacement of light on a prisma has to do with the atomic structure of the prism.