How does a photon "know" that it's left one charge and that it's going to another one? How does it know the same charge it left will be the same charge it will return to? My understanding is photons are neutral and have no charge.
i.e.
Like charges repel, unlike attract. All charged particles emit photons which are uncharged. So how does the photon "know" that it's leaving one kind of charge and "lands" on another?
A neutral "particle" shouldn't be affected by charge.
 A: You should not imagine a virtual photon as an individual object wandering from one charged particle to another. This picture is simply inapplicable. Unfortunately, Feynman diagrams mislead people to imagine such things.
Actually, Feynman diagrams are good for calculation and bad for imagination. Feynman diagrams have been introduced to help physicists to collect the mathematical terms for the perturbation series. And here they are very helpful. They have not been introduced to help people to imagine what actually happens.
That said, one always needs to keep in mind where virtual particles enter the theory: They come in when one calculates the perturbation series. A perturbation series, however, is an approximation by definition. It is not a full theory in itself. If you see it from this side you will realize that virtual particles are actually artefacts of the mathematical theory. They probably even do not have a counterpart in reality.
In QED one normally starts with free field Hamiltonian (or Lagrangian). Its eigenstates are  free photon and free electron or other particle fields. Free fields are actually an idealization: They do not exist in nature since there is always some interaction. Nevertheless, if the particles are  far apart from each other free fields are considered as a good approximation.
When one now turns on the interaction, the free field states are no longer eigenstates of the Hamiltonian. The new eigenstates are complicated mixtures of the free field states (if they live in the same Hilbert space at all). That means, a new eigenstate of the interaction Hamiltonian could be imagined as a new particle which is a complicated mixture out of the free particle states and therefore out of the free photon and electron states. In that way, electron and photon are no longer separate states, but mix to form new states as long as the interaction is in effect. 
In any case, the new eigenstates cannot be solved for explicitely. Instead, the scientists use the perturbation series to get an approximate solution for the scattering processes. In this perturbation series the interaction is modeled as happening at certain specific points in space and time while in between the particles are propagating as "free" particles. These in between propagating particles are referred to as virtual particles. They are clearly an artefact of the perturbation series and they are not something which is happening in reality. 
Charge itself is a measure of the interaction between certain particles. It is not a direct observable. Again, you should not consider it as some distinct feature of a particle which makes this particle attract or repel other (charged) particles (though, often is is viewed that way). Otherwise you indeed have a problem to understand, why the photon is contributing since it carries no charge. Instead, charge leads to an interaction term in the Langragian and causes the fields contributing in this interaction term to mix. The fields contributing are the fields of the charged particle and the photon field.
That is also, why charge cannot be measured directly, but has to be extracted from the interaction amplitudes formed by the interacting fields. This fact is important for the renormalization of quantum electrodynamics.  The pure charge can even become infinite in the renomalization process as long as the charged measured via these interaction amplitudes has a reasonable, finite value.
A: 
All charged particles emit photons which are uncharged. 

They may, given the right boundary conditions.

So how does the photon "know" that it's leaving one kind of charge and "lands" on another? 

What you are describing here is a "virtual photon", an interaction between two charged particles.
There is the complicated way, i.e. mathematical solutions with integrals and boundary values,for the problem "electron  electron scattering" for example, and there is the iconic aid of the Feynman diagrams that allow a visualization of the process.


One possible Feynman diagram for electron-electron scattering: electrons (labeled "e") repel each other because one spits out a photon ("γ") that hits the other. Our rules take care of everything else. 

In the complicated way, it is the solutions of the scattering amplitude and the boundary conditions that create the "knowledge". In the, equivalent mathematically but simple conceptually, iconic way it becomes clear that the photon couples to the electron, and it is a virtual photon because it is not on mass shell.  It is called "an exchange of a virtual photon" because the intermediate carries all the quantum numbers of a photon except its mass is not necessarily zero.
Whereas it does not couple to first order with a neutrino ( for example)  This theory works describing data and predicting new data to a very great accuracy.
To first order means that an electron and a neutrino have zero chance of scattering electromagnetically , but there are higher order Feynman diagrams that allow an electromagnetic interaction between charged and neutral although giving very small probabilities for this. It again  is of course a lot of integrals and boundary conditions.
A free range photon, emitted by the acceleration of an electron in the sun's magnetic field for example, eight minutes ago can be considered on mass shell, a real particle . Scattering off an electron the reaction again will be described mathematically and be computable, and it will depend on the boundary conditions and the energy of the photon : bound electron? free electron? on what the result ( "know") of the scattering will be. It is all calculable and with the aid of Feynman diagrams simpler to visualize.
A: You can think of a photon as a quanta of energy. In that case, it can impart its kinetic energy to a charged particle, or, vice vers, a unit of energy can be released when a charged particles slows down and loses kinetic energy
