According to this post and references there, the charge of the Sun is positive, the magnitude is estimated as 77 Coulombs, or about 1 electron per million tons of matter.
The reason for this is that
The net global charge on the Sun comes about because electrons, being rather less massive than protons, are more able to escape the sun as part of the solar wind. The net charge achieved is a result of the balance between the forces that eject the solar wind, which push electrons more efficiently then protons, and the attractive force on the electrons of the net positive charge that results. Equilibrium of these forces establishes the allowed net charge.