We discuss continuous traffic flow network models including traffic lights. A mathematical model for traffic light settings within a macroscopic continuous traffic flow network is presented, and theoretical properties are investigated. The switching of the traffic light states is modeled as a discrete decision and is subject to optimization. A numerical approach for the optimization of switching points as a function of time based upon the macroscopic traffic flow model is proposed. The numerical discussion relies on an equivalent reformulation of the original problem as well as a mixed-integer discretization of the flow dynamics. The large-scale optimization problem is solved using derived heuristics within the optimization process. Numerical experiments are presented for a single intersection as well as for a road network.