Lignin is responsible for lignification of plant cells. Thus the strength of plant tissues is given by lignin. And yeah, you are right. Lignin brings shelter to the cell walls, as lignin makes sure that water is kept in xylem. So its rather in the other way round: the xylem which is responsible for the transport of water and nutrients is waterproofed to prevent that water cannot get through the xylem cells to the cell walls.
There are two different xylems, namely primary and secondary xylem. In terms of the secondary the xylem vessels are made of the cell division of the cambium.