Free space optics (FSO) is a wireless optical communication technology that uses light for data transmission. It offers significant advantages, including high bandwidth, unlicensed spectrum, high security, and ease of installation. However, the performance of FSO communication is primarily affected by atmospheric attenuations, atmospheric turbulence and misalignment of the transmitter with the receiver. Foggy environment is a well dominated attenuation compared to rain attenuation and can cataosphere the FSO communication. In contrast, radio frequency(RF) communication is susceptible to rain attenuation but it is minimally impacted by foggy conditions. The complementary aspects can be combined to provide seamless connectivity to users. A realistic challenge arises in the choice of link selection among the FSO/RF communication. In this work, a novel switching mechanism is designed and implemented based on current channel conditions and received signal strength. Dataset is collected with the indoor experimental setup which records the images of environmental conditions and received signal strength indicator (RSSI) to the corresponding channel conditions. The grey level co-occurrence matrix (GLCM) attributes are calculated for every image for feature extraction. Different machine learning algorithms are trained and tested with the dataset to classify the atmospheric condition by predicting the RSSI value. An experimental demonstration of the proposed method under indoor atmospheric conditions is designed and implemented by integrating best performed machine learning algorithm with edge computing and cloud technology. To monitor the channel from remote locations the predicted output is uploaded to the cloud and switching decision can be taken depending upon the predicted output. The hybrid machine learning algorithm with ensemble stacking method is also proposed which enhances efficiency of switching by predicted Bit Error Rate(BER) levels and current atmospheric conditions. Model driven deep learning algorithms can detect FSO signals transmitted through turbulent, atmospheric affected channels by improving the BER at lower Signal-to-Noise Ratio (SNR) levels compared to traditional maximum likelihood estimation techniques. Incorporating deep learning algorithms with novel architectures in the switching mechanism can significantly reduce the outage probability of FSO systems offering advantages over traditional switching systems.