A general rule when speaking in English is that you should contract all unimportant words so that it's easier to identify keywords in a sentence. Like "He's a boy." and "He IS a boy." has different meanings. So, there is some difference in "I have..." and "I've got..." But generally, it's just preference.
It is also possibly, a level of politeness. Asking "Do you have a pen?" is generally quite a polite way of asking about something. More casual speech would be, "You got a pen?", dropping the 'have' completely from the sentence. However, your English teacher may frown on these sort of sentences.
Unfortunately, levels of politeness is not something clear cut in English. It's quite neutral in terms of politeness, so you have to be a bit creative. Generally, the things grammarist frown on would fall into more colloquial, common everyday talk and those that grammarist prescribe are more polite and used in writing.