This is not an example of perpetual motion.
Both kinds of wind are driven by temperature differences (the trade winds by temperature differences between different latitudes, which in turn are caused by the angle of the ground relative to the incoming solar radiation; land-sea wind systems by the temperature difference between land and sea surface in the course of the day).
Over a warmer surface the air is heated and rises up (as warm air has a lower density). This reduces the air pressure and air is "sucked in" (actually pushed in by the higher pressure) – causing a wind. The convection cell is then closed by the converse effect higher in the atmosphere (where the air rises up to the pressure is increased and the air is pushed to where, over cold surfaces air is pushed down).
So, the natural convection is ultimately driven by heat energy supplied by the sun. As usual with thermal energy, only temperature differences can be converted to mechanical energy. So, e.g. when the surface temperatures between land and sea have equilibrated over the course of the night, the land-sea wind will cease.
Coriolis force does not really matter for the discussion. It changes the direction of the winds, but it does not accelerate the winds on its own (as the Coriolis force is perpendicular to the velocity, it does not change the absolute value of the velocity).
What happens when regarding the sun as energy source as part of the system
This does not work out either. The catch is the second law of thermodynamics. To extract work the thermal energy from the sun we need a second heat bath (namely, the cold almost isotropic space!). So we can't just take the sun as part of the isolated system. If so we have to take the entire universe as our system (because we need the rest of the universe as "entropy dump"!). Also, this process will not be reversible, as processes that couple to a heat bath can only be reversible, if the temperature differences during heat exchange are infinitesimal (exactly what happens in the Carnot cycle – we heat and cold our work medium isentropically in the parts of the cycle where we isolate the medium from the heat bath, and then have a quasistatic isothermic expansion/compression when connected to the heat bath).