How to use and retrieve data file from AT command in Arduino D1 Mini Wemos (With esp8266)
The command is documented in the ESP8266 AT Command Reference, with a non-PDF option at https://room-15.github.io/blog/2015/03/26/esp8266-at-command-reference/#AT+CWLAP

The response from the AT+CWLAP is a series of lines listing available access points, and for each, you are given their encryption method, SSID, RSSI, MAC, and the channel (or frequency offset and a calibration value).

It would be up to the you to parse the resulting strings to obtain the APs, sort by signal strength, and decide what to do with that information.

EDIT:

Because you are using the Arduino environment/core to write code for the ESP8266, you won't be able to use the AT command set. The AT Commands are available when the ESP8266 has the EspressIF firmware loaded to it, and thus the ESP8266 module is intended to be a peripheral device to some other controller; contrast with your use, where the ESP8266 is the only controller, with the WiFi ability baked in.

In this case, you will need to examine the features of the Arduino ESP8266 core, especially the ESP8266WiFi library, which gives an example sketch for scanning the available WiFi networks.