Solar energy is not produced by the sun’s heat, but by the physics of how the semiconductor cells work. They actually work better the colder they are. So those hot inland solar energy systems are actually losing some output on hot summer days, compared to their cool coastal cousins.
We have a number of satisfied customers whose systems are installed practically down to the water’s edge. So yes, solar works fine on the coast. Although fog is a factor, there are still many clear days at the coast. And even on foggy or cloudy days, solar generation still happens, but at a lower level, proportional to the level of sunlight reaching the ground. The result is that immediate coastal installations lose about 15% of production compared to inland, on an annual basis, but the results are still well within the range to make solar successful on the coast.