In recent years, Wireless Sensor Networks (WSN) have been increasingly involved in Intelligent Transportation System (ITS) optimization, especially in dynamic management of signalized intersections. This paper discusses the state of art and shows an IEEE 802.15.4 network architecture to monitor vehicular traffic flows near to a traffic light. The architecture is characterized by an innovative algorithm in order to determine green times and phase sequence of traffic lights, based on measured values of traffic flows. The main aim of this work is to reduce the average waiting time. To confirm the validity of the proposed approach, some case studies have been considered and several simulations have been performed.