Optical wireless communication (OWC) encompasses the utilization of optical frequencies, including visible light (VL) and infrared (IR), for unguided data transmission. Two common terms within this field are free-space optical (FSO) communication, which involves laser-based systems for long-distance point-to-point transmission at IR wavelengths, and visible light communication (VLC), which refers to LED-based systems with shorter transmission ranges at VL wavelengths. For outdoor operation of these systems, it is critical to understand the interaction of optical signals with the propagation environment. The extinction coefficient measures how strongly a light at a specific wavelength is attenuated as a result of its passage through a medium. Over the years, many studies have attempted to determine the extinction coefficient in various atmospheric conditions; however, the majority of these studies are limited to the IR spectrum and also come with several other constraints. In this paper, we use MODTRAN (MODerate resolution atmospheric TRANsmission) software, which solves the radiative transfer equation (RTE) for the given input parameters of operation wavelength, the observer altitude, target altitude, and path length in km. First, we extract the transmittance of the optical beam through fog, rain, cloud, drizzle, and aerosol through extensive simulations in the MODTRAN for optical wavelengths of 350–1550 nm. Then, we use a non-linear curve fitting to obtain closed-form expressions for all these atmospheric conditions.