Indian languages, and in particular Sanskrit, may be unique in that there is a distinct separation between the language and the scripts used to write it. Over the centuries a number of scripts and variation have been particularly important in preserving Buddhist texts. Buddhists were, like their Brahmin counterparts, initially reluctant to employ writing for the preservation of texts that were composed and transmitted orally. But eventually in several places, notably Sri Lanka and Gāndhāra, the sūtras were committed to writing. Here are the broad outlines of the development of Indian writing as it relates to Buddhist texts in roughly chronological order.
The first script to be used for writing Indian languages was Kharoṣṭhī beginning in the 3rd or 4th century BCE. It was used for several hundred years to write the local dialects, but also Sanskrit. Kharoṣṭhī was used in Gāndhāra in North West India (what is now the Pakistan shading into Afghanistan - i.e. Taliban country) and in central Asia. It shares many features with the Aramaic used by Persian administrators at the time when they were influential in that region, and most scholars accept that Aramaic was probably the model for Kharoṣṭhī. It was both carved in rock and written with pen and ink on birch bark. Quite a number of early Buddhist texts survive in Sanskrit and in the Gāndhārī Prakrit (roughly the vernacular dialect of Gāndhāra). A Gāndhārī version of the Dhammapada survives for instance, and several other texts which parallel the Pāli but with interesting mostly minor differences. These texts have helped to flesh out our knowledge of the different early schools of Buddhism.
Brahmī was the first truly indigenous Indian script. The name means simply "God" - Brahmā having been adopted as a creator god by this point. It was a definite improvement on Kharoṣṭhī in having individual signs for initial vowels, and greater variation between characters which made it more readable. My guess however is that it was designed for carving rather than writing per se. The signs are simple, geometric and quite linear. Aśoka (mid to late 3rd century BCE) used this script for most of his rock edicts - a few were in Kharoṣṭhī or Aramaic, and one was in Greek reflecting the local usage in the far West of his imperium. Probably most Buddhist texts were written in this script in Eastern and Central India until the 3rd century CE.
An early south Indian variety of Brahmī became very important. The Sinhala script emerges around the 2nd or 3rd centuries BCE and was used to commit the Pāli Canon to writing. It shows the rounded letter forms characteristic of writing designed for palm leaves with their pronounced grain that could be easily punctured.
In the North the Gupta script (so-called because it emerged during the Gupta Era, ca 3rd - 6th centuries) also derives from Brahmī. It shows the influence of pen and ink writing (probably still on birch bark). Versions of the Gupta script were used throughout North Indian and central Asia to transmit Buddhist texts. Many of the early Buddhist texts going to China would have used this script or one of its Central Asian variants. Some use of decorative writing - what we might call calligraphy - began to appear at this time.
Siddhaṃ was initially a word written in the top left hand corner of any piece of writing in the Gupta period, meaning perfection or accomplishment. However as the script changed and the letters became more elaborate Siddhaṃ (or more fully siddhamātṛka) began to be the name of the script. By the collapse of the Gupta Empire (under attack by Huns) in the 6th century the script had become distinct. However it continued to undergo development for several centuries. Two forms are commonly seen nowadays that I call "Chinese brush style", and "Japanese pen style". The latter appears to be a further refinement of the Indian script, while the former is influenced in it's form by the demands of writing with a brush. This script was important in the East as the medium of the early Tantric texts. What's more Tantric Buddhism initially inherited Vedic injunctions to preserved accurate pronunciation of letters and so the Indic script was preserved especially in the case of mantras - they can still be seen in the modern Taisho version of the Chinese Tripitaka for instance. Siddhaṃ calligraphy was elevated to a fine art by the Japanese. While Kūkai introduced Siddhaṃ to Japan and produced some fine works, the modern popularity derives from an 18th century revival. Siddhaṃ is mainly used for writing mantras and bījas these days, although shakyo or sutra copying has not completely died out - the Heart Sūtra being a favourite text.
An early variant of Siddhaṃ formed the model for the Tibetan Uchen (dbu-can) script which is now the main script used in printing Tibetan works. It further developed into many variants more suited to hand-writing for instance. We can deduce from it's description of the vowel 'e' (which is an inverted triangle representing the yoni) that the Hevajra Tantra still looked to the Siddhaṃ script as its model of writing.
The earliest appearance of Devanāgarī (देवनागरी literally "City of God") is about the 8th century but it did not supplant Siddhaṃ as the main script for writing Sanskrit in North India until about the 10th or 11th century. Many late Buddhist texts, such as later Tantras would have been written in Devanāgarī. Sadly the fluidity of the relationship is lost on most people and the Devanāgarī script is often referred to by the uninitiated as "Sanskrit" - as in "can you right this in Sanskrit for me". Devanāgarī has proved to be remarkably stable - with only minor changes occurring since it was adopted. It has been adapted for writing Hindi and as Hindi is the most prominent of the official languages of India, it is widely used through the sub-continent. Pakistan has adapted the Arabic script fro writing Urdu though it is very similar to Hindi.
Two other scripts which are frequently used in Buddhist contexts are the closely related Lantsa and Ranjana, from Tibet and Nepal respectively. These are often assumed to be identical but this is not true. They emerged in about the 11th century and are both are still in use for ceremonial or decorative purposes. Tibetan texts will often have the Sanskrit title in Lantsa as well as dbu-can at their head.
Although these scripts are all related and all descend from Brahmī originally, knowing one does not always afford insights into reading the others. Some letters such as ṭa stayed remarkably stable, whereas others such as ja changed quite radically over time. Tibetan Uchen retains an archaic form of na which disappeared from India, while other letters are similar to more modern forms, and some appear only loosely based on an Indian precursor. Since conjunct consonants (such as jña or ṣṭha) are written combined into a single glyph and each script does this in slightly different, and sometimes idiosyncratic ways (for instance in Devanāgarī श + री = श्री).
Writing was probably introduced to India by Persian invaders who had themselves absorbed the techniques from other conquered peoples, especially the Aramaeans who were a semitic race that has since disappeared but left a huge legacy. It is thought that parts of the Old Testament of the Bible were composed in Aramaic and that it may have been Jesus's mother tongue. The Aramaic roots of Indian writing are most clear in Kharoṣṭhī. However it was not long before Indians adapted the art of writing to their own languages, and subsequently Indian Buddhists helped to establish the written word in vast swathes of the East including Tibet, Burma, Sri Lanka, and most of South East Asia. Indian scripts influenced the development of the Kana scripts in Japan and the Hangul script of Korea.
Images from Visible Mantra scripts page.