Is sunlight a fossil fuel?

No, but all fossil fuels are highly concentrated forms of far-ancient sunlight trapped in organic cells.