Yes. However be aware that it is very colloquial and informal and therefore shows either a familiarity with a person or that you are very enthusiastic and informal. With the wrong person, it might be considered disrespectful or sarcastic.
You would not generally say this to someone's mother, a judge, a priest or someone in a formal setting. It would better to say "You're welcome" in most cases.
Also, "You got it" can also mean "Yes I will" or "Yes" as a slang way of saying "You have got it right" which in this case has been shortened to "You got it."
Q: "Can I count on you to bring all the beer?"
A: "You got it!"
Note: "You got it" is a slang and in a way also involves slightly incorrect grammar, however in colloquial speech with an enthusiastic or cool/confident attitude to the right kind of person in the right situation, it can be a cool thing to say. However, without the right lineup of circumstances, it can be a very uncool thing to say. Good luck.
I note that the three responses saying yes are all from native AmE speakers. I'd just like to say that in BrE, we don't use it like this (unless you hear it from someone who regularly uses American terms in their speech).
The responses to "Thank you" are generally:
Not at all. (Rather old-fashioned)
We do also hear:
Sure! (Also an AmE expression, I believe)
No problem/No probs!
No worries. (Australian expression)