You are talking about this question ?
If yes then here since it is not mentioned so we don't assume recoil and all
But to be general it is something like this
Photon being a quanta of light shows dual behavior
It is carrying energy in the form of waves but at the same time it can collide with the atom
So when it collides it basically transfers it's energy to the electrons and also uses it's (particle behavior) to collide with the atom (note that photon does not have rest mass)
Also generally photon recoil won't be asked I suppose neutron and proton collision with atom may be asked!
Although there are relativistic (photon inspite of not having rest mass has mass) and quantum phenomenon taking place at the subatomic level which is way out of course ...But it is an interesting subject !