The basic explanation is that forces such as electric attraction/repulsion work differently on long distances because the positive and negative charges 'cancel' eachother out.
Seen from a long distance, you can more or less model a planet or a sun as a point. The charge of this point would be the total positive charge minus the total negative charge. This would most of the time come out to zero, or at least very close to it.
Compare this to gravity. Gravity has no negative charge, so instead of canceling eachother out, all mass works together. Now, it requires a load of mass to have much of an effect on anything, but we have plenty of that in suns.
The formulas you might want to have a look at;
F(electrical attraction)=k * q1 * q2 / r^2
Note that q1 and q2 can be both positive and negative, and this effects the direction of F.
F(gravitational attraction=M * m1 * m2 / r^2
Here m1 and m2 can only be positive.
This message has been edited by Melchior, 01-25-2005 17:15 AM
This message has been edited by Melchior, 01-25-2005 17:22 AM