Make light visible once it passed through a transparent object
(This answer revised thanks to @lemon pointing out what should have been obvious..)
If you're prepared to use OSL, (and therefore the CPU for rendering,) this  script might be a tool to add to your box. By tracing back down the incoming ray to a light, it returns information about the object being lit. It's not all used in this example, but might be useful if you go for a different effect.
#include &quot;stdosl.h&quot;

shader LitObjectIDX(  
        output float    ObjectIdx = 0.0,
        output float    MaterialIdx = 0.0,
        output vector   LitP = 0.0,
        output vector   LitN = 0.0        
)
{  

    if (trace(P,I)){
        getmessage(&quot;trace&quot;, &quot;object:index&quot;, ObjectIdx);
        getmessage(&quot;trace&quot;, &quot;material:index&quot;, MaterialIdx);
        getmessage(&quot;trace&quot;, &quot;P&quot;, LitP);
        getmessage(&quot;trace&quot;, &quot;N&quot;, LitN);  
    }
}

ObjectIdx and MaterialIdx are the Pass Index settings for the object and material being lit. LitP and LitN are the location and the normal of the lit point, in World space.
Make a 'Portal' plane, of ordinary fully transparent material, occupying the doorway. For this tree, give it a Pass Index of 20 in its Object &gt; Relations panel. You could use other indices, for other portals.
This node set-up for the yellow through-light restricts the lighting to the portal itself, and areas seen through the portal, contrasting those seen from behind and those seen from in front. Since writing, you've told me that the camera doesn't need to move, so the second restriction, (most of the bottom branch) is not required. Just use the Transparent Depth on its own. My effect looks a bit odd, anyway.

The attached .blend is a bit more complex than needed just to illustrate this method.. you would probably just want to use the script, one way or another, to suit your particular purposes.