Can EEG data be converted into a bright and dark square strobe through input frequency values on Psychopy?

Yes this can be done. You might start with some of the other “real-time EEG” threads:

Depending on your EEG system, you can stream the data out via Python or LSL, do an FFT or other frequency conversion, and then scale that to a value for the stimulus properties.