I think ThreePhaseEel and A.I. Berveleri have figured this out. That circuit was originally wired for a light only, with a 12/2 cable going up there - hot (black), neutral (white) and ground.
Somebody added the fan later on, and they cheated. They used ground for neutral. They used black for the fan and white for the light.
First, mark your wires. Get some electrical tape and bundle together the white now going to
TO LIGHT and the black going to
TO FAN. These go to the fixture. Do that as far back as you can, so they are still free.
Note the black with white stripe wire. The wire nutted to it is supply power, or "always hot". Mark it (solo) with electrical tape so you can find it again.
Now, think about replacing that switch. Either with a plain switch, or with a modern dimmer or smart switch that plays well with LEDs and may have a neutral. Don't bother with CFLs, they are obsolete.
Now to put it back proper. The fixture white and black will be hot and neutral.
The white wire (to fixture): Add it into that bundle of (white) neutrals with the red wire-nut. It will stay there for good, no matter what switch you use.
The two remaining black wires go to the new switch. If you're keeping the old switch, move the black wire (to fixture) from
to fan and move it
I won't delve further into how to install switches because it's routine from here.