Looks like a low voltage ac transformer for your house doorbell. One thin wire runs to the actual doorbell, the other to the push button near the front door.