For instance, coastal areas are often foggy in the morning. Then the sun “burns it off”. Where does the moisture go? I’m curious of the star’s (i.e. Sun) influence on evaporation effects.
Simplistically, fog consists of water droplets. The sun provides energy, which heats the droplets and evaporates them, and also raises the air temperature. The water is still there, it's just in the form of (transparent) water vapor, rather than light-scattering droplets.
PS: Maybe a similar example would help make things clear. Say you've just washed some clothes, and hang them on the line, and some time later they're dry. There was water in the clothes when you hung them out, it didn't drip off the bottom, so where did the water go? Into the air, as vapor, no? Same with fog, when the sun raises the temperature a bit.
The occurrence and disappearance of fog is due to the dew point, which is:
the temperature at which the air can no longer "hold" all of the water vapor which is mixed with it, and some of the water vapor must condense into liquid water. The dew point is always lower than (or equal to) the air temperature.
If the air temperature cools to the dew point, or if the dew point rises to equal the air temperature, then dew, fog or clouds begin to form.
Some people talk of the sun burning off the fog. All that happens is the sun warms the air to temperature greater than the dew point and the small droplets of water that condensed out of the atmosphere to produce the fog re-vaporize and can no longer be seen.