What prevents overflow in this system?
I assume this setup is somewhat hypothetical because the water level monitor would not be very useful as shown.  Disregarding that...

Q:  What prevents [fluid] from overflowing the cooling reservoir?

I agree at first glance this setup looks like it will function as a siphon and the fluid will drain to the bottom reservoir and out, but there are two key points that prevent that:


Most importantly, the lines connecting top and bottom tanks are connected to the top of the upper tank.  A void will appear under the connections to the upper tank as soon as the upper tank level recedes due to any water being drawn out.  The void will break the siphon.  Worst case is only the water in the lines will flow into the lower tank.  Then the flow will stop.  The lower tank has enough reserve capacity to accommodate the liquid in the lines.
Unless the upper tank is high enough above the lower tank to overcome the force of a vacuum (roughly 30 feet of elevation for water), the liquid will have difficulty leaving the upper tank if the upper air valve is closed.


Q:  What is the purpose of the valve?  Should it be open for the water level monitor to work?

I am going to answer these in the reverse of order asked.


The valve must be open for the water level monitor to work.  When the valve is closed, captive air in the upper part of the level monitor will have no place to go, hence water will be unable to enter or leave as the level in the upper tank changes.  Having the valve closed is as good as having the level monitor turned OFF.
What is the purpose of the valve?   That's a good question, and without more detail the best I can do is hazard a guess.  The upper tank is a heat source which is being cooled.  If the coolant gets hot enough to boil then it might be necessary to temporarily close the valve to prevent a mess of hot liquid sputtering out.  Judging from the trap placed in the line before the valve, I think that is a possibility.