A Sign of Trust and Honesty
As with many food traditions, the clinking of glasses traces its root to the health and safety of the drinker — in this instance, it goes back to the tendency of nobles to kill each other off by poisoning their food!
Back in medieval days, as the water was often polluted, and milk was both useful for other things and thought to be "for children only", wine was very commonly drunk because it was one of the only safe liquids available. As the wine in those days was often full of sediment, a poison could be easily introduced into it.
To prove that his wine was safe, the host would pour a bit of his guest's wine into his own glass and drink it first. If the guest trusted his host, however, he would merely clink his flagon against that of his host's when his host offered his cup for the sample. The "clink" was a sign of trust and honesty.
As time went by this chiming noise also brought a festive feel to events — and brought to mind the 'safe' feeling of church bells.