Sustainable agriculture is a pivotal driver of a nation’s economic growth, especially considering the challenge of providing food for the world’s expanding population. Agriculture remains a cornerstone of many nations’ economies, so the need for intelligent, sustainable farming practices has never been greater. Agricultural industries worldwide require sophisticated systems that empower farmers to manage their crops efficiently, reduce water wastage, and optimize yield quality. Yearly, substantial crop losses occur due to unpredictable environmental changes, with improper irrigation practices being a leading cause. In this paper, we introduce an innovative irrigation time control system for smart farming. This system leverages fuzzy logic to regulate the timing of irrigation in cotton crop fields, effectively curbing water wastage while ensuring that crops receive neither too little nor too much water. Additionally, our system addresses a common agricultural challenge: whitefly infestations. Users can adjust climatic parameters, such as temperature and humidity, through our system, which minimizes both whitefly populations and water consumption. We have developed a portable measurement technology that includes air humidity sensors, temperature sensors, and rain sensors. These sensors interface with an Arduino platform, allowing real-time climate data collection. This collected climate data is then sent to the fuzzy logic control system, which dynamically adjusts irrigation timing in response to changing environmental conditions. Our system incorporates an algorithm that generates highly effective (IF-THEN) fuzzy logic rules, significantly improving irrigation efficiency by reducing overall irrigation duration. By automating the irrigation process and precisely delivering the right amount of water, our system eliminates the need for human intervention, rendering the agricultural system more dependable in achieving successful crop yields. Water supply commences when the environmental conditions reach specific thresholds and halts when the requisite climate conditions are met, maintaining an optimal environment for crop growth.