The Ogham alphabet was created and used by the Celts. The Celtic God Ogma, the god of wisdom, learning and eloquence is credited in Irish legend with creating the Ogham alphabet and gifting humanity with it. Though an old alphabet, there is no physical evidence it pre-dates Christianity. The oldest stones with Ogham carvings date from around 300 to 700 C.E. Originally, the Ogham alphabet appears to have been used for very mundane purposes, such as marking gravestones and identifying property lines. Each Ogham letter, called a few, is associated with a particular tree or plant which the Celts regarded as sacred. Originally there were only twenty Ogham fews. An additional five were added later on (I can find no mention of how much later on, or why), but many Ogham-users employ only the original twenty.
While it cannot be definitively-proved the ancient Druids used the Ogham for divination, the ninth-century Irish epic, The Wooing of Etain does include a scene where a druid named Dallan uses the Ogham fews to discern where Midir had hidden Etain.
Two of the earliest-printed mentions of the Ogham alphabet appears in Irish monastic works: The Book of Leinster, written circa 1160 and The Book of Ballymote, an Irish medieval manuscript written in 1390 or 1391. Ballymote gave an overview of each letter, its meaning, and its particular plant, mostly trees, so the Ogham has also been called ‘The Tree Alphabet’. Included in the book were several diagrams using the Ogham fews, but the purpose of these diagrams is a mystery. One theory is, these diagrams are fragments of a lost system of using the Ogham for magic and divination, but this is speculation.