Probably the degree of formality:
To me, these two are essentially interchangeable. Both are causal but correct.
Have you got a pen?
Do you have a pen?
This one is too formal -- a little odd unless you intend to sound affected:
Have you a pen?
Another way to phrase the question that is correct, not overly formal, but slightly more polite would be:
May I have a pen, please?
Hope this helpful. I am a native English speaker from the United States, so my response might be different from a native English speaker from the United Kingdom.