the maximum length of an ethernet cable is 100m - so as long as you can run a cable accross neighbour's premises ... that's the best way. then a switch or a wap lets you cover the other building
to do it wirelessly ... is less reliable ... some people will tell you they connect to a neighbour in the next street ... others can't get a signal in the next room.
you can get high gain aerials (hawking is the rolls-royce brand)
http://www.google.co.uk/products?sourceid=navc lient&hl=en-GB&ie=UTF-8&rlz=1T4GPTB_en-GBGB294 GB298&q=wifi%20hi%20gain%20antenna&um=1&sa=N&t ab=wf
but there are no guarantees without line of sight