I was just watching the news and saw the ISIS flag and it got me thinking
Writing, or just solid color flags, are prevalent in middle eastern culture because they abide by Islamic rules which forbid the use of animals, plants, etc. Early Muslim flags were often just a single color; usually: white, black, or green. However, this is not always true, non-Arabic Muslims use many well known symbols on their flags, such as the Ottoman crescent and star, or the Iranian lion and sun.
For the IS-flag: This is Mohammed's seal, the colour black symbolizes jihad and will transist to white (as you can see it on the Islamic Emirate of Afghanistan's flag) when it becomes an established caliphate/emirate that is no longer at war. This type of flag was most likely used by Mohammed himself while on conquering expedition (his descendants used some other colours, like green), but as /u/mikealan said it, this only counts for Arabic muslim countries (and Islamistic groups)
It is not just writing, it is the islamic declaration of faith: "There is no God but Allah and Muhammad is his prophet". Its presence on a Muslim flag is compable to the presence of a cross on a Christian flag.