What is the advantage to hiring someone with a license?
It varies from place to place, but in general, there's a few things you can expect from licensed tradespeople.

they've shown a commitment to their business, so have a higher probability of being competent.
they probably have liability insurance (for if they burn your house down) and worker's comp (for if they injure themselves). As a homeowner, you're encouraged to check for proof of both of these things, btw. If an uninsured trade has an accident, it might roll downhill to you or your insurance.
there's a greater likelihood that they'll be around in the future if a warranty concern comes up.
depending on jurisdiction, a licensed trade will be able to give you an enforceable contract.
a licensed trade will be able to pull building permits to ensure that work is done to code.