They're called "approach signals." It's designed to increase bulb life. When a train enters the block in advance of the signal (which is always well enough in advance so that the engineer never sees a dark signal), they illuminate. After the train passes the signal, they go dark (unless there is another train in the block).
The signals on the Lowell line at the Anderson/Woburn station had been approach signals for a few years, but as of about two weeks ago, they've reverted to full-time illumination. I asked a conductor about that, and he said that MBCR has been making such changes, but he didn't know why.