Depends.
First thing I do is appraise.
If the Pokemon isn't one care for and it's appraisal is weak, I xfer it.
If it's rare but bad, I might keep it just in case. I had a 300 Aerodactyl with optimal moveset but weak IVs as well as cp. Eventually I xfer'd it as I wasn't going to power it up.
Now, moveset is fairly important.
(For gyms and eventually duelling).
I kept a 51 rated Gengar because it's moveset was ideal. 51 still low though.
High CP might not matter much if it's IVs are bad. I xfer lots of mons with high cp but weak IVs. Also, I'll xfer mons with nice IVs/CP if their move set is useless.
However I do make exceptions. I've caught 3 Snorlaxes. All terrible. IVs, cp, moves. Except the third I recently caught had 1700 cp. 33 rating and not very good moves. I kept it but that's a personal choice.
I keep mons with 80%+ rating and good moves.
Keep in mind I'm not necessarily making the best choices. Do more research by searching similar questions.
I had a Dragonite appear at my place once. Caught it. Bad IVs, 3-400 cp and its moves I don't remember but I xfer'd it. I had no candy and I'm sure I'll get a better one eventually.