Siddhaṃ means 'perfected' or 'accomplished' and is believed by some Buddhists to be the perfect script intended for writing the perfect language: Sanskrit.
Ancient Indians did not use writing for spiritual purposes. Scripture was heard at the foot of the master, and committed to memory. Writing was introduced, probably from Persia, by merchants who used it for commerce. King Aśoka (273-36 BCE) chose writing to communicate his message by having it carved on large pillars. He wrote in a vernacular Prākrit and mainly used the Brahmi script, although Kharoṣṭhī and even Aramaic and Greek scripts were also used. However around the 1st century BCE Buddhists began to write down their scriptures, and writing became an increasingly important medium for Buddhists.
Siddhaṃ is descended from the Brāhmī script, which also gave rise to the Devanāgarī scripts as well as a number of non-Indian scripts such as the various Tibetan scripts, and most of the scripts of Southeast Asia. It was an influence on the developement of the Japanese kana script and on the Korean Hangul script.
The story goes that when a student was learning to write during the Gupta era (ca. 3rd - 6th centuries CE), that the teacher would write siddhāṃ or siddhāṃrastu (may their be perfection) for the student to copy out. Gradually the writing became known as Siddhāṃ, and by the 7th century it was a distinct script. However Siddhaṃ continued to change and develop. As well the forms of siddhaṃ in stone inscriptions is often slightly different to written Siddhaṃ because of the demands of the medium. The calligraphy on Visble Mantra is in a form of Siddhaṃ that owes a lot to refined Medieval Japanese aesthetics.
John Stevens suggests that siddhaṃ (with a short a) is more grammatically correct Sanskrit, but that tradition has preserved the long ā. Also Buddhist Sanskrit frequently, and irregularly diverges from Classical Sanskrit because it's origins are in a prakrit (or vernacular) which has been modified to be more like Sanskrit.
The Buddhist scriptures that were taken east by Indian missionaries and Chinese pilgrims were written in a number of languages and scripts. Siddhaṃ is really only remembered because the Japanese monks Kūkai and Saicho, studied it in China and transplanted it into Japan in the early 9th century. Kūkai and Saicho founded, respectively, the Shingon and Tendai schools of Buddhism. Shingon is a purely esoteric, or Mantrayana school, whereas the Tendai school is primarily an exoteric school focused on the White Lotus Sutra, but incorporating esoteric elements. Both still use Siddaṃ for writing mantras.
An important change occurred in China. In India, even though they did begin to write scripture down, it was always as an aid to memory - writing was secondary. The Indians had solved the problem of a large number of dialects and languages by using a lingua franca - Sanskrit, and to a lesser extent Pāli. In China however, which also boasts a large number of dialects, the problem was solved by a common writing system which could be pronounced according to dialect, but read the same everywhere. By the time the Buddhist scriptures arrived in China, nothing was worth anything unless it was written down. So Siddhaṃ came to be more important in it's own right.
Not long after Kūkai and Saicho's visits, the T'ang dynasty collapsed and Buddhism almost died out in China - certainly esoteric Buddhism, in which the Siddhaṃ script was particularly used for writing mantras, did die out in China. However esoteric Buddhism, along with the study of Siddhaṃ, still survives in Japan. Siddhaṃ also survives in Korea, although books on Siddha do not record this fact, a photography turned up recently on Flickr.com which shows a Korean Bīja mantra which clearly originates from the Siddhaṃ script. Jayarava corresponded with the author of the photo and discovered that they are relatively common - no more information has surfaced since.
Another place where Siddhaṃ survives is in the Taisho version of the Chinese Tripitaka. In the days when it was compiled it was still considered essential to preserve the correct Sanskrit pronunciation and so rather than transliterating mantras with Chinese characters, as was done with names for instance, the Siddhamṃ was preserved alongside the Chinese translation. The example shown (right) is from Taisho No.859 which is a pūja manual. It shows a mantra and the mudra which should accompany it. The mantra is na maḥ sa ma nta bu ddhā nāṃ ha - namaḥ samanta buddhānāṃ ha. With a Chinese transliteration below. Most mantras in the Mahāvairocana Sūtra start with "namaḥ samanta buddhānāṃ" rather than oṃ
Attitudes to pronunciation have shifted over time, and now both the Tibetans and Japanese (not to menton English speakers!) regularly pronounce mantras with no regard for the Sanskrit. It is sometimes said that the mantras "still work" but I've never been very sure what that means and prefer to learn to attempt to accurately render the Sanskrit rather than accept the cop-out.
The copying of sutras, mantras and seed syllables, known as "shakyo" is still an important spiritual practice in Shingon Buddhism. Although Siddhaṃ is primarily intended for writing Sanskrit it can be used to write any Indic language - see the Pāli phrase sabbe sattā sukhi hontu for instance.