What you are looking for is duct seal. You can pick it up at most home centers. This will seal the external conduit, where the power line enters the house. For sealing the studs, you could get a can of insulating foam (Great Stuff or another brand).

Can you put insulation inside electrical box?

Never spray insulating foam inside an electrical box, as this can cause overheating of the wires.