@milimi,
It may be determined by tangibility. An object as a book or knife, you could say "give it to me"; whereas intangible things such as answers, or ideas, "give me it" would be appropriate. But, if there is a question a choice of receivers, "give it to me" would be used, unless it was an order, or imperative, than "give me it" would be more correct. IMHO