Let $\newcommand{\lang}{\mathcal L}\lang_1$ and $\lang_2$ be deterministic context free languages, the set of which is denoted by $D$. Is $\lang_1 \cup \lang_2 \in D$, if and only if $\lang_1 \cap\lang_2 \in D$?
Some thoughts
I don't think this is true. Assuming $\lang_1$ and $\lang_2$ are DCFLs, there are corresponding deterministic pushdown automata $A_1$ and $A_2$ that recognize them. Let's assume the acceptance happens via accepting states.
As per usual, if we look at the union language, we could construct a product automaton $A_1 \times A_2$ and choose its accepting states, so that in the case of the union $\lang_1\cup\lang_2$ it accepts the language if either or both of the automata are in their accepting states. With the intersection automaton, we choose the accepting states so that both $A_1$ and $A_2$ have to be in their accepting states.
By this logic, assuming that $\lang_1 \cup \lang_2 \in D$ is not a strong enough condition to conclude that $\lang_1\cap\lang_2 \in D$. This is because the automaton that recognizes a union might also recognize a language that is not in the intersection language. Therefore the claim is false.
The actual questions
Is the above logic even starting to point in the right direction? If this is the case, I would of course have to come up with good counterexamples. One of these might be something like the pair $\lang_1 = \newcommand{\set}[1]{\left\{#1\right\}}\set{a b^n c^n \mid n \in \mathbb N_0}$, $\lang_2 = \set{b^m c^{2m} \mid m \in \mathbb N_0}$. The union of these is in $D$, but so is their intersection, the empty set $\emptyset$. Maybe by modifying these just a little bit I might arrive at a solution?
Also, is there a better way of looking at this, maybe via grammar productions, even if my idea was good enough? The grammar productions that result in the languages $\lang_1$ and $\lang_2$ are $$\newcommand{\rewrite}{\longrightarrow} S_1 \rewrite c \qquad V_1 \rewrite ab \qquad W_1 \rewrite SA \mid S aAb $$ and $$ S_2 \rewrite \epsilon \mid abb \mid aSbb \,. $$ But how might I use these (or the modified versions of them) to show the wanted result?
Let $L_1 = \{a^nb^n \mid n > 0 \}$ and $L_2 = \{a^nb^{2n} \mid n > 0 \}$. Then $L_1 \cap L_2$ is empty, and hence deterministic. However, $L_1 \cup L_2$ is not deterministic. Furthermore $L_1^c \cup L_2^c = (L_1 \cap L_2)^c$ is deterministic, but $L_1^c \cap L_2^c = (L_1 \cup L_2)^c$ is not deterministic, otherwise its complement $L_1 \cup L_2$ would be deterministic. This gives a counterexample for the two directions of your question.