Upon hitting the sun, it should kill the pilot (maybe the crew too? I think only unconscious though) and if its a freighter or capital it should skip off the sun 1 square over and be damaged. Fighter subclasses are just destroyed.
"All ships except fighters and gunboats sustain hull damage (30% to 50%), ionic damage (15% to 35%), and shield loss (25% to 60%) and are moved one square to the left, away from the sun (if the sun or blackhole is at X-coordinates 0, then the ship is moved 1 square to the right). The pilot is killed if he is in control of the ship (piloted mode)."
Also as I have mentioned before in other posts, there is a known bug that a sun damaged ship with say "Orbit of Sun xxxx" and actually isn't in the coordinates of the sun.
The ship should have been pushed out to one square to the... Right? It may still read that it is in the sun in your inventory. That itself is a known bug. However, if you look at the system map, you will see that the ship is not on the sun, but the one square over. keep this in mind :p
Descending to a sun's ground will not kill you, once one idiot tried to kill me by sunning on GR-75, too bad for him there was a bug that turned off sunning, but it was an interesting experience to feel the hot helium enveloping you. And too bad for me I could not kick him out of the ship, to swim in that hot ocean.
Jesfa has it right. Pilot dies, passengers are all knocked out. It's also worth noting it is impossible to destroy a ship when sunning no matter how many times it is sunned be cause it takes damage as a multiple of its remaining hit points.