Trigger based on Solar radiation

What is the best way to configure a device to switch on/off based on a solar radiation threshold? This way certain load devices can ONLY be activated when there is enough solar generation

Also interested in this, think there should be a solar panel or energy storage, like wall battery or sth.