Rankine cycle efficiency can be up to 45%; monocrystalline solar panels ~25%? I suppose you aren't paying for the sunshine, but if cloudy days affected coal power, James Watt wouldn't be famous.
If you're going to make that comparison, you need to compare apples-to-apples and include solar efficiency in the coal too. After all coal's energy originally came from the sun. Plants converted the sunlight into energy at an efficiency of about 1%. A miniscule fraction of that energy went into the plant growth, and then a miniscule fraction of that energy was captured when the plant was converted into coal.
Luckily solar panels work for 30+ years while coal works for only as long as you burn it. You can also recycle solar panels, but try reversing entropy to get your coal back and you’ll see what’s up. Cloudy days are solved by wind, ocean energy, geothermal, storage, etc.