How could it fly to the sun, when it's propelled by sunlight?
I imagine it can't tack back-and-forth like a sailboat, since that requires friction of the water, and there is no such friction in space.
It seems a solar sail could only be propelled away from the sun.