It is done by ray-tracing from the pixel position to the light direction. Since there are only spheres and a plane to intersect, it is feasible to do it in the GPU and it is fast.
In case you were thinking about gas giants flatteness: yes, in Antares all the planets are perfect spheres. Flateness won't add much to the gameplay (and if I don't mention it, almost nobody will notice)
