Lightning cable works in computer but not in wall
It's not that surprising - a lot of 3rd party accessories aren't of a very high quality, and some of them don't support all functions. 

For example, there are many Lightning cables on the market that support charging, but not data transfer. 

Another example is some speakers support charging of iDevices, while some only support the transfer of audio data.

The quality of the cable can impact the amount of charge travelling through it and how many devices it will or won't work with. Some cables deteriorate faster than others, meaning they stop working with some devices and not others, or just stop working totally.

Also, sometimes it isn't the cable, but the charger or accessory it is connected to. 

Another variable is the amount of current going through the cable - it's quite likely that the current from your chargers is higher than your laptop (especially if they're Windows laptops).

Regardless of the cause/reason, I've seen your scenario occur many times and sometimes disconnecting and reconnecting the cable a few times gets it to work, but it's certainly not a cable I would trust any more. And they wouldn't be worth trying to fix either.

I'd keep them for as long as they work with your laptops, but would otherwise replace them and ensure you buy cables from a reputable source/brand.