You didn't mention what OS you are using... and it does matter in this case.
Whilst this works, it's using Visual Basic Script and ahem, Internet Explorer - but it works (unless you're on a Mac)
Ordinarily I'd use JavaScript for Photoshop scripting, but I don't think you can access the clipboard from there.
The code is straightforward, but the mechanics ugly
Dim appRef
Set appRef = CreateObject( "Photoshop.Application" )
' Switch off any dialog boxes
appRef.displayDialogs = 3
appRef.BringToFront
' call the source document
Dim srcDoc
Set srcDoc = appRef.ActiveDocument
Dim layerName : layerName = appRef.ActiveDocument.ActiveLayer.name
' Wscript.Echo layerName
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Navigate("about:blank")
objIE.document.parentwindow.clipboardData.SetData "text", layerName
objIE.Quit