The increasing demand for efficient urban waste management necessitates intelligent systems for optimizing collection routes. This study presents an IoT-enabled route optimization framework, integrating machine learning and metaheuristic algorithms to enhance operational efficiency and minimize environmental impact. Ultrasonic sensors, interfaced with ESP32 microcontrollers, monitor bin fill levels in real-time, transmitting data to a centralized database for analysis. A data-driven decision-making system prioritizes bins requiring immediate collection, reducing redundant trips. Ant Colony Optimization (ACO) dynamically generates optimal routes originating and terminating at a central depot while exclusively targeting filled bins, with Folium-based geospatial visualization providing an interactive mapping interface for collection teams. Additionally, machine learning models analyze historical sensor data to predict waste accumulation trends, enabling proactive route adjustments. By leveraging IoT-driven data acquisition, predictive analytics, and combinatorial optimization, this framework significantly reduces fuel consumption, operational costs, and carbon emissions, aligning with sustainable urban development goals.