"dar en la tecla", in Cuba we say "dar en el clavo", this phrase means that you achieve exactly the result you want but without complete awareness of what you were doing. That is, you are trying to achieve some result and you try different ways to do it and one of those things you try "da en la tecla".
I hope I was clear enough cause I find it rather difficult to explain. I guess
hit the target could be a good equivalent.
