Let me assume that the theory of $L$ is an element of $L$. This happens, for example, if $L_\alpha\prec L$ for some ordinal $\alpha$, because in this case the theory of $L$ is the same as the theory of $L_\alpha$, which is an element of $L$. Let $t$ be the theory of $L$, which is (coded by) a real in $L$. This real is therefore the $\alpha^{th}$ real in the $L$-order, and in order to define the theory $t$, it will suffice to define the ordinal $\alpha$. Let $L[G]$ be a forcing extension of $L$ forcing to collapse $\aleph_{\alpha}^L$ to $\omega$. So in $L[G]$, the true $\omega_1$ is the same as $\omega_{\alpha+1}^L$, and we can determine this inside $H_{\omega_1}$. In that structure, we can define the class of ordinals that are cardinals in $L$, and there will be exactly $\alpha$ of them. This makes the theory of $L$ definable inside $V=L[G]$ by a formula quantifying only over reals, and it will be $\Delta^1_n$ for some smallish $n$. Let's try to find out how complex the definition is. My proposed definition is that in $V=L[G]$, the theory of $L$ is the theory coded by the real $t$ which is the $\alpha^{th}$ real in the $L$ order, where $\alpha$ is the longest well-ordered sequence for which there is an $\alpha$-sequence of reals coding ordinals that are each infinite cardinals in $L$. So, $t$ is as desired if exists a real coding $\alpha$, the real is well-ordered, $t$ is the $\alpha^{th}$ real, and exists a sequence of length $\alpha$, such that every real on the sequence codes a well-order, they code strictly larger ordinals as you go on the sequence, and they are all $L$-cardinals, and every infinite $L$-cardinal is there. Unless I'm mistaken, it looks $\Sigma^1_3$. And I think we can make it $\Delta^1_3$, by getting a $\Pi^1_3$ representation using the uniqueness of $\alpha$.