SegWit (Segregated Witness) is a protocol upgrade for Bitcoin that fixed transaction malleability, a long-standing issue. Fixing this made the Lightning Network, a second-layer solution for fast and low-cost transactions, more secure and easier to implement on Bitcoin. In essence, while they serve different functions, SegWit's implementation paved the way for a more robust Lightning Network.