This gets asked a lot, both from urban planners who would like a 'silicon <region>' miracle for their area and by various company people. Clearly having several great engineering schools nearby (Stanford, Berkeley, SJSU, UCSC, Etc) helps. Clearly having a big pile of money sitting in pockets around Sand Hill Road helps. Clearly having an ecosystem of job shops that can 'fill in' all of the various functions from prototype manufacturing to legal services helps.
Of course none of that happened all at once. There was Fairchild, there were the various 'secret' projects hosted out of Stanford in the early 50's, so at some level there needs to be a seed ecosystem that can exist with a small set of customers but is applicable to a larger set.
I have seen the question on hacker news now and again and it was kind of hard to understand what the allure of the valley was until I visited for a week at Startup School. It was fascinating to view and compare it to my own experiences. I have thought many times that you can change things and break the mould but when you see the tidal wave of constant and relentless, for the want of a better word, progress it makes you see how difficult and how many factors are involved in creating another Silicon Valley.
I agree with what the OP is saying about Scotland, which is a crying shame, because Scotland was once what Silicon Valley is now - a hotbed of new ideas, entrepreneurs, and technological innovation.
Many of my friends here who work in IT are certainly talented and able, but are content to coast in relatively low-paid jobs in academia or some branch of government, or maybe a bank or insurance company. You are more likely to find local entrepreneurial spirit among car mechanics and taxi drivers.
The thing is they aren't even that happy with their jobs. They hate the petty bureaucracy, insane procedures and moronic policies. But they would never think of startups as an option.
Of course none of that happened all at once. There was Fairchild, there were the various 'secret' projects hosted out of Stanford in the early 50's, so at some level there needs to be a seed ecosystem that can exist with a small set of customers but is applicable to a larger set.