You can't, in that there is no web resource to scour.
I've been successful by stealth on one occasion by phoning them pretending to be a business customer whose VAT receipt was partially torn and could they help me - needed it for my VAT return.
Why do you need to know? And why won't they tell you?
I would have thought if you had any sort of legitimate reason to need to know (such as you are a customer or supplier) then they are obliged to tell you. Otherwise why would you want to know their vat number?
Any UK Ltd company must have their VAT reg number on their comapnies paperwork, letterheads-vat receipts-till receipts etc along with all details of directors and reg offices. If they are not Ltd they should still have it on their sales doc's. Technically you can not claim back vat unless you have a VAT receipt and that must have their vat number on it.