The verb harp is defined as "to dwell on or recur to a subject tiresomely or monotonously." The phrasal verb harp on can be used with the object of on being either the thing about which you are dwelling or the person to whom you are speaking:
I flung away the paper I was still holding. I sat up, I slapped the table with my open palm. I wanted to know why he would keep harping on that, my absolutely private affair. It was exasperating, really.
Joseph Conrad, The Shadow Line, 1917We've always harped on one requirement of backyard astronomy: a telescope must be comfortable to use if you hope to carry out any serious observing project.
Sky & Telescope, December 1987Even though your mom's eating extremes are reason for you to be concerned, you can't stop them. … And harping on her to eat the right foods won't necessarily help; in fact, it could make matters worse by making her feel like she's being judged and controlled.
Cathi Hanauer, Seventeen, June 1993Yet Knight constantly harped on Alford's weakness as a passer, his inability to find open men. Alford--never forgetting that first talk--was used to this.
John Feinstein, A Season on the Brink, 1989
The harp is regarded as having a sweet sound, to the point where it's traditionally associated with angels. So how did it come to be used in this idiom to refer to unwanted nagging?
Harp on is a shortening of a longer idiom: harp on the same string. That phrase comes with many variations: harp on one string, harp upon a string, etc., and it still turns up in its original longer form occasionally:
For the film's corporate-drone protagonist, the only way to escape the numbness of the modern professional's existence was to regress to primal violence; only when in physical pain could he really feel. Today's crop of real-world hardship dramas appear to harp on a similar string.
Celia Wren, Commonweal, 11 Aug. 2000
To harp on the same string means to play the same note continuously. It's not a stretch to understand that the sound of the same note being continuously played, no matter the instrument, can have a nagging effect on whoever happens to be within earshot.
The abbreviated phrase harp on was already established by Shakespeare's day (along with the occasional harp of or harp upon). The longer phrase provides a moment of linguistic play in Richard III:
QUEEN ELIZABETH. O, no, my reasons are too deep and dead-
Too deep and dead, poor infants, in their graves.
KING RICHARD. Harp not on that string, madam; that is past.
QUEEN ELIZABETH. Harp on it still shall I till heartstrings break.
In Hamlet, Polonius uses harp on in an aside to the audience:
POLONIUS. "How say you by that? Still harping on my daughter. Yet he knew me not at first. He said I was a fishmonger. He is far gone, far gone!
Dating from before the 12th century, the noun harp derives from the Old English hearpe and is related to the Old High German harpha.
We could provide you with more examples of the phrase being used. But we wouldn't want to harp on it.