Hi
I don't think anyone is sure why the phrase exists. It seems to be very old. My guess is:
- to tap someone lightly on the arm is to give a secret signal; the old phrase would have been 'to tip'
- to wink at someone secretly, is to give a signal in a similar way - to give them the wink
- For emphasis, to show to someone you are giving important confidential