In a lightning storm, an agitated atmosphere with high winds and circulating water particles generates some extremely high voltage lightning. Now look at the sun, its the same thing but on a super-massive scale, solar flares many times larger than earth are always errupting from it, its surface is liquid and is always moving and gyrating, this is SO much movement of matter it causes more friction than you will ever be able to comprehend. More friction means more high voltage charges, more charges and discharges of electricty mean higher frequency resonation.
Actually I beleive the sun works like this.
The sun's core gravity is so strong that the electrons of the atom collide into the center of the atom(nucleus), But because matter can never touch a huge force is created and the atomm explodes apart. Repelling each other in opposite directions.