Control Wifi mode through Arduino

Is it possible to change the wifi mode to Monitor from AP or client mode and back from within the Arduino code? We would like to put the Yun in to passive ( Monitor ) mode so that it can listen for a remote connection request to put it back into either AP or client mode so that 2 way communication can resume.

Yes you can.
In order to keep your sketch short, your need to write two bash scripts.
They will run on the linux side and will call the programs "uci" (for changing configuration) and "wifi" (for restarting wifi).

Take a look at this Wireless configuration [Old OpenWrt Wiki]