Dear Student,
Light is an electromagnetic wave having oscillating electric and magnetic fields in it. When light passes through the walls of a house, the electric field interacts with the electronic structure of the atoms and molecules of the bricks in the walls. Due to this interaction, the electric field gets scattered and finally absorbed by the bricks and so no light can pass through the walls.
Regards