A safety line or tether for use on the lunar surface was first carried on Apollo 12. It was provided because "concern existed before the mission about operating on the inner slope of the crater (Surveyor crater) where Surveyor 3 had landed. A 10 meter tether was provided in case stability was questionable."
The Apollo 12 tether was actually 9.1 meters (30 feet) long and it weighed 0.7 kg. Bean, in a 1969 Technical Debrief recommended that a 30 meter (100 foot) tether should be supplied to future missions. He said:
It wasn't very difficult, I didn't think, to operate on that slope. It wasn't particularly slippery... But I do think that having a strap or tether that you could use — in the event that you got down into too steep a slope, to help you get back out — is a good idea. It probably ought to be a standard piece of equipment on the following missions. As Pete brought out earlier, it would have been nice to go down to the bottom of that slope (at Bench Crater) to the material that looked melted. Our strap was only about 10 meters long, and I would recommend that, as a standard piece of equipment, that you put a strap about 30 meters long in a saddle bag or somewhere in your equipment. That way, you could help a man down the side of a slope. He could just carry that strap down to the bottom and pick up any rocks he wanted to get, and then you could help him back up.
I don't think you would have any trouble; you would have to use discretion in case you got halfway down and found out the sides were a little more slippery than you thought.
Apollo 13, 14 and 15 carried one 30 meter tether each, whereas the later Apollo missions didn't carry tethers. None of the tethers were ever used and probably all except the one carried by Apollo 14 were left behind on the moon (obviously except for the Apollo 13 one).
The Apollo 14 tether
The Apollo 14 Stowage List details one "Safety Line, Lunar Surface (100 ft)" (Item Number B 1041, Part Number SEB33100290-302) as being stored separately in a bag in the MESA (Modular Equipment Stowage Assembly) on the side of the LM.
On the lunar surface on February 5th 1971, the astronauts (Shepard and Mitchell) transferred the tether from the MESA to the MET (Modularized Equipment Transporter) along with other equipment. The MET was used to transport equipment and rock samples, and it was pulled (and carried!) by the astronauts up to the rim of Cone Crater and back.
When preparing to leave the moon on February 6th, capcom asked Mitchell to put the tether into the ETA (Equipment Transfer Bag) for transfer back to the Lunar Module, where it was put into the left-hand stowage compartment. This was strange since the Apollo 14 Stowage List indicates that the tether should have been left behind on the moon along with a lot of other equipment.
The reason initially given for the astronauts to take it was so that it could be used to tie down extra sample bags, but the real reason may have been in case the crew had trouble docking with the CM and had to make an impromptu spacewalk. They could have tied the tether between the two spacecraft and climbed along it to the CM (note that the crew had docking problems with the LM on the way to the moon). In the event the docking was successful and the tether was transferred by the astronauts to the CM.
On return to Earth, part (all?) of the tether was chopped into 26 mm x 7 mm lengths and made into official presentations from the crew of Apollo 14 to staff at the Kennedy Space Center in gratitude for their hard work. If part of the tether remains I do not know where it is now.