how to hardwire an exterior rope light properly?
Well, this installation certainly does not appear to be in any way NEC compliant - it would appear that the power cord for the current rope lighting was simply run into the wall (where it is not listed to be) and caulked (and if hardwired, had its plug snipped off, and likely has stranded wire connected to terminals only listed for solid wire.) 

The connector is no doubt proprietary to the maker of the rope lights and probably also to the era of the particular rope lights, rather than being anything standard.

I would suggest replacing the entirety of this travesty with something a bit more up to snuff.



Based on a quick look at a few LED rope light products, all of which seem to be of the "plug in" type, I would suggest replacing the "cord out the wall" with a properly wired outside outlet, GFCI or on a GFCI-protected circuit, in an outside box, with "in-use cover" to accommodate a plug in connection. If you find an LED-rope light (or power connector for same) that is actually designed for hardwire connections, you could skip the outlet and just have a junction box for the connection, but the circuit should still be GFCI protected. Since you want this controlled by a switch, make it a switched outlet that connects to the switch in question.

If that's more than you feel comfortable doing, hire an electrician - it should be a fairly small, straightforward job.