Back in the day they relied on TV's being poorly shielded and as such would radiate a lot of "noise", part of this would be the local oscillator in the TV, whose frequency would change dependent on what centre frequency the TV was set to receive. Use a highly directional aerial setup and you could pick up the local oscillator frequency, and by knowing what frequencies were used in the area for TV not only could you tell if someone was watching TV, you could tell which channel they were watching.
In America, at least, there was a company that used the same technology to collect data on what people were watching as market research and to help provide viewing figures.