My understanding for this is that electrons weigh a lot less than anything else so they have higher velocities (at the same temperature, because of thermodynamics). For matter to escape the earth requires a minimum velocity. So the result is that the earth loses more electrons than positive ions (or negative ions). The result is that the earth is positively charged.
On the other hand, in the earth's atmosphere, the transfer of charge is due to rain. Charged ions and electrons are attracted to raindrops for the same reason that charges are attracted to a conducting surface, that is, the image charges. But electrons are lighter than ions and so electrons get to the raindrops before ions and so raindrops are net negatively charged.
Since raindrops fall to earth, the earth ends up negatively charged while the atmosphere above it is positively charged. This is the source of the "sky voltage":
http://en.wikipedia.org/wiki/Sky_voltage.