As far as I'm aware, this was something particular to the early Celtic church in Ireland.
Before I attempt to explain further I'd like to add an important caveat in regard to terminology:
These days, the term "Celtic Church" has, rightly, fallen out of favour with many (perhaps most) historians. The reason is that the term implies that there was a unified and identifiable entity that was entirely separate from the mainstream of Western Christendom. This was certainly not the case.
However, there were certainly some quite distinct Irish traditions and practices (albeit with many local variations!). In this context, I think the term "early Celtic church in Ireland" is appropriate specifically because of the common aspects of Irish law which helped shape many aspects of the early adoption and development of Christianity in Ireland. Some of those features came to be a significant factor in enabling the attacks that you describe.
We know that Christianity had spread to Ireland by the early fifth century. However, Ireland had never been a part of the Roman Empire, so there had been no prior tradition of the Roman church in Ireland. An entry in the Chronicle of Prosper of Aquitaine seems to suggest that Palladius had been sent to Ireland in 431 as the first missionary bishop sent by Rome. If so, his mission was hardly a resounding success. However, the later mission by Saint Patrick was certainly more successful, and we have records of a number of churches founded in towns (or, perhaps "civitates" might be a better term at this stage in their development) like Armagh.
The Monastic tradition became established in Ireland in the late 5th and 6th centuries. This also planted the seed of the later problems. Under Brehon Law (the early laws of Ireland), the revenues generated by the monasteries were forever granted to the heirs of the founder. Thus each monastery was, from its inception, an hereditary fiefdom - a microcosm of feudalism.
It is instructive to note that when Brian Ború assumed the High Kingship around 1000 AD, one of his first acts was to have his secretary write into the Book of Armagh a confirmation of the right of Armagh to all church revenues in Ireland, breaking the feudal power of the monasteries.
In Ireland, as elsewhere, the major monasteries became extremely wealthy in both land and gold. They also gained political importance. What was almost unique to Ireland, however, was that, because of the feudal roots of the Monastic system, many monasteries became increasingly secularised from the 8th century, as the close ties between ruling families and monasteries manifested themselves.
The history of early medieval Ireland appears to have been one of endemic internecine conflict, as illustrated by the annals and legend of Conn of the Hundred Battles. The Irish monasteries were also a part of that culture. They were often allied (frequently by ties of blood) with other local kings. To the best of my knowledge, the chronicles do not make it clear whether it was monks, or lay brothers, or the local population who owed service to the monastery who actually did the fighting.
You mentioned the example of the war between the monasteries of Taghmon and Ferns in 817. In that case, Cathal mac Dúnlainge, a king of the Uí Cheinnselaig of South Leinster, allied with the monastery of Taghmon in an attempt to strengthen his position against other kings of Leinster.
You could just have easily have quoted the case of Feidhlimidh mac Crimthainn, King of Muster in the ninth century. He he had previously been a monk (supposedly a Céilí Dé, or "Companion of God", no less!), who rose to the post of Abbot and then to be King. In the course of his reign, he plundered and burned the abbeys of Fore, Clonmacnoise, Kildare, Durrow and Tallaght. He also set himself as Abbot at Cork and at Clonfert. Despite this, after his death, he was later considered a saint by some in Ireland.
- The Annals of Ulster, written in Irish Gaelic, with some entries in medieval Latin (also available as an online translation) is one of the best primary sources.
- Herren, Michael W, and Brown, Shirley Ann: Christ in Celtic
Christianity: Britain and Ireland from the Fifth to the Tenth
Century, Boydell Press, 2002
- O'Croinin, Daibhi: Early Medieval Ireland 400-1200 (2nd
edition), Taylor & Francis, 2016