It is determined by the Cowboy’s management, league rule, the temperature at game time etc.
I went to the stadium website but I saw nothing about how they determine if the roof is open or not.