How can neutral atoms have exactly zero electric field when there is a difference in the positions of the charges?

If something is 'Electrically neutral' this means that the algebraic sum of its electric charges, however distributed, is zero.

This does not imply that there is no electric field in its vicinity. Plenty of neutral bodies – even, it is believed, the neutron – have electric fields, for just the reason you have pointed out.


It is said that atoms with the same number of electrons as protons are electrically neutral, so they have no net charge or net electric field.

This is a great over-simplification, which I am sure you have already determined (based on why you are asking this question). You can have objects that are polarized where, overall, they have no "net charge", yet the distribution of charge is very important. The example you give is an excellent one of a dipole, where the net charge is $0$, yet $\mathbf E\neq 0$ at distances away from the dipole.

Really, the idea of electrically neutral is a macroscopic description meaning that if we look in this general area we will see that the number of positive charges exactly balances our the number of negative charges. However, as we "zoom in" we will find this to not be the case for an "electrically neutral" body, since (neglecting QM) we will have point charges at specific locations, and most of the "charge density" will be $0$ due to no charges being present at all, and then "infinite" (or at least really large) at the locations of the charges.


Building upon other answers, we must first differentiate between net charge and electric field - an atom with an equal number of equally charged positive and negative particles will have no net charge, but may still have an electric field, depending on the arrangement of the charge, as in a dipole.

Now, your intuition is correct, it doesn't seem valid that a hydrogen atom is a dipole simply because of the spatial distribution of the subatomic particles. Based on the answer to this question:

Is there an electric field around neutral atoms?

Electrons are not actually "orbiting" the nucleus, and in fact they are not spatially localized, their probability distributions are spread over the nucleus, which leads to a symmetric distribution and neutralization of the overall electric charge in space.