The generally accepted rule for SEO purposes is that to get into a local search, you either need to be hosted on an IP address allocated to the country you are targetting or you need to be on a TLD associated with that country.
Therefore to get a good ranking for a .com in the UK, your best bet is to host in the UK, however if you have a .co.uk, then you should be OK hosting it outside the UK (however in my own experience, I've found better ranking for a .org.uk site I manage for a local charity since moving it to a UK server)