Recent advancements in computer vision technology, developments in sensors and sensor-collecting approaches, and the use of deep and transfer learning approaches have excelled in the development of autonomous vehicles. On-road vehicle detection has become a task of significant importance, especially due to exponentially increasing research on autonomous vehicles during the past few years. With high-end computing resources, a large number of deep learning models have been trained and tested for on-road vehicle detection recently. Vehicle detection may become a challenging process especially due to varying light and weather conditions like night, snow, sand, rain, foggy conditions, etc. In addition, vehicle detection should be fast enough to work in real time. This study investigates the use of the recent YOLO version, YOLOx, to detect vehicles in bad weather conditions including rain, fog, snow, and sandstorms. The model is tested on the publicly available benchmark dataset DAWN containing images containing four bad weather conditions, different illuminations, background, and number of vehicles in a frame. The efficacy of the model is evaluated in terms of precision, recall, and mAP. The results exhibit the better performance of YOLOx-s over YOLOx-m and YOLOx-l variants. YOLOx-s has 0.8983 and 0.8656 mAP for snow and sandstorms, respectively, while its mAP for rain and fog is 0.9509 and 0.9524, respectively. The performance of models is better for snow and foggy weather than rainy weather sandstorms. Further experiments indicate that enhancing image quality using multiscale retinex improves YOLOx performance.