There are many causes for price difference in bikes. There are others reasons than these listed below, but they tend to fall in line with one of these four categories.
Branding is always a premium. As in every industry I can think of, some brands have a reputation that to some extent justifies a premium price. This reputation is based off a multitude of sub factors, such as warranties, customer care, recognized build quality, athlete association and such. Top brands such as Trek, Giant, Bianchi, etc. have built up a reputation over the years of their existence that people deem worthy of a premium price.
Materials used in the frame (and also components, but more on that later) affect the characteristics of the bike, but due to the nature of high-tech processes, these come at a price. For instance, high-modulus carbon fiber performs better than cheaper carbon types. The pricier stuff is lighter, stiffer, stronger, more durable or some combination of the above. Likewise, carbon has superior performance properties compared to aluminium or lower still, steel. Within the scope of any one material (carbon, aluminium or steel) there are many sub-classes that will perform better or worse - and have a price to match. The two bikes listed exemplify this point - both are made from aluminium, but the more expensive bike is made from a higher grade (7005 as opposed to 6061). The more expensive option also has a carbon fork - an expensive but potentially worthwhile investment.
Bikes most commonly come as complete units, with only super high-end models available as frame only builds. This means your money is covering all the components on the bike as well as the frame. Components make a big difference to the bike's performance, from weight or strength to durability or aesthetics. The componentry of your bike directly influences the way you use it. For instance, clipless pedals (such as Shimano's SPD system) determine the way you pedal. The bike listed have some important differences in componentry:
The cheaper of the two has gear shifters separate to the brake levers. This is common on cheap road bikes, but in my opinion is incredibly annoying. Purists may argue that old bikes were made this way, but honestly, I find them almost dangerous due to the necessity for hand position changes every time you go to change gear or brake. Perhaps just a personal opinion, but worth considering.
The other big component difference is the gruppo - the drive-train, gears, etc. On the dearer model we have a FSA Omega compact BB30 Crankset. While not the top of the line, I would assume that this particular set would be more reliable or better built that the otherwise unnamed model from the cheaper option.
Finally, before we get bored of details, the wheels are an important component to consider. More expensive options are sometimes made from carbon, but stepping down from the elite we still see performance features such as flattened spokes or radial spoke arrangements. The Equation R's on the Diamondback have radial spoke lacing, but the Vilano does not.
In the realms of the super elite, performance gains become harder to achieve, and the associated cost increases drastically. There appears to be some sort of law of diminishing returns at play - the price difference between a 20kg bike and a 19kg one may be $200, while it could well cost you $2000 to save a couple of grams of paint (not kidding - check out Trek's Project One customization site, specifically the 5gm Vapor Coat Paint. That's pricey!). Essentially, we reach a point in the spectrum of bikes that performance is so good, that other factors such as custom paint or gram savings through carbon brake levers and spacers become the only avenues for improvement. This uber-rich world of cycling is almost exclusively for the professionals and hence self-funds through sponsorships and such, but it is available for anyone lucky enough to have deep pockets and exorbitant taste!
So those are the main reasons for the price discrepancy. Hopefully that should educate your purchasing decision! Good luck!