My question is when we consider light as a photon and send it (photons) one by one, what are those things which determine which photon will be reflected and which one will be refracted
It is called Quantum Mechanics. The photon is a quantum dynamical entity, it is not a small part of a beam of light. Classical light (electromagnetic wave) is made out of a quantum mechanical superposition of zillions of photons with energy $hν$, where $ν$ is the frequency of the emergent light.
Quantum mechanics obeys postulates, and the main one is that all particles obey wave equations , and the solutions of the boundary conditions for the given problem give different wave functions,$Ψ$, whose complex conjugate squared $Ψ^*Ψ $ gives the probability amplitude for the photon distribution after the interaction.
as reflection and refraction occur simultaneously?
Not all, really, as the photons do travel with velocity c. It is like throwing weighted dice, each interacting photon is a throw from the probability curve, the weight given by the boundary conditions imposed on the solutions of the quantum mechanical problem. The end result is the classical reflection and refraction, but at the photon level it is all probabilities.