Yes, car puncture repair kits are legal and safe to use in emergencies. Remember though, products like Holts Tyreweld should only be used to get you to your destination and are not a permanent solution.
After a puncture, we’d always recommend getting the tyre fixed or replaced by a professional.