Why does a light-beam bend through a prism, and usually more so for violet than red? (And how does it relate to photon energy?)
Firstly, the key you need to understand is that light moves slower in a medium (such as a prism) than it does in nearly free space (such as air). Light is a wave (a propagating oscillation) of the electromagnetic field. Light always travels at the same speed ("c") in free space, including the free space between atoms of a medium. However, it scatters from atoms and molecules. Specifically, light's oscillating electric field perturbs the electron clouds around atoms to undergo simple harmonic motion, and this periodic acceleration of electric charges causes a secondary electromagnetic wave to be radiated outward from each atom. The phase of this secondary wave is delayed with respect to the original wave (because displacement lags acceleration in simple harmonic motion due to inertia of here the electrons). When you add up all of the interference effects between the original wave and the contributions radiated from all the points in the continuous medium, the result is equivalent to if the light simply propagated a bit slower than "c" (while within the medium), but with the same frequency (and hence with a shorter wavelength).
Now, when a plane wave (such as light, or any other wave) impinges at an angle on a zone where its wavelength (the spacing between successive wave-fronts) becomes shorter, the angle of the wave-fronts bends. This is Christiaan Huygens' principle.
What you're really interested in is not the direction of (the normal perpendicular to) the wavefront, but rather, the direction of the light beam as a whole. This is again dictated by interference. Conveniently, the math turns out that the beam bends the same as the wavefront does (and by learning the math you encounter interesting additional affects such as diffraction, where the beam spreads out and changes direction at the edges, and occasionally results in interesting patterns). You can roughly estimate this outcome by drawing Huygens-Fresnel diagrams (where for each point along a wavefront you pencil a circle of radius one wavelength of that zone, and maybe rub out a bit at half-wavelength radii, then most of the thicker concentrated marks will correspond with where most of the beam's energy is propagating).
The reason red usually bends less than violet is simply because violet usually propagates slower through a medium than red does. This is a property of how strongly the particular material interacts with electromagnetic waves of different frequencies (hence, how strongly it re-radiates, which interferes and results in the slowing effect above). This is called dispersion: the dependence between refractive index and frequency.
Note that the details of dispersion are specific to the material. A few materials may bend red more than they bend violet, which is called "anomalous dispersion" (rather than "normal dispersion").
Now it turns out that the dispersion relation can be determined from the absorption spectra of the material. (The math connecting these is the Kramers-Kronig relation.) As you mentioned, the energy of a red light beam is divided amongst many photons, whereas the energy of a violet light beam is more concentrated among fewer photons. Where this starts to come into the explanation is that anomalous dispersion usually occurs close to a resonance peak (where the photons have almost exactly the right amount of energy to excite the atoms/molecules to a different quantum state).