"Happen to know" vs. "came to know" vs. "got to know" vs. "came across"

Solution 1:

Happen to know means something like You might not expect me to know, but I do. It often implies that I have privy knowledge: somebody's told me a secret, or I know about something before it is published. It is quite often a boast "Look at me, I'm special, I know this information which most people don't know", but not always.

Come to know (past: came to know) is a somewhat literary way of saying find out or learn (a fact), or become acquainted with (a person).

Get to know (past: got to know) means become acquainted or better acquainted with (a person). It is also a rather colloquial alternative to come to know (a fact).

Come across (past: came across) means find by chance or find out by chance.

Solution 2:

I don't know if it helps but I have included a few sentences of correct usage of the expressions you mention.

'I happen to know the person you can see in that car.'; 'I came to know him when we were near-neighbours twenty years ago'. (This is less usual) 'I got to know him and his family quite well'. 'I recently came across his name when searching through some old paperwork'.