The majority of study on lightning in eruption plumes has been done on silicate rich plumes. These are the dark grey plumes you see in more plinian type eruptions (such as pinatubo), phreatomagmatic and some vulcanian eruptions. It is within these columns that lightning is more common.
In general within these columns the larger particles at the base of the plume with smaller at the top. Within the column the overall charge is moe positive at the top and more negative at the base. This creates what is termed a dipole and consequently lightning occurs. However there are other mechanisms based on the type of eruption, the content of the eruption and the location (altitude).
There are two main ways which plumes are thought to become charged; these are during the fragmentation process (often termed fractoemision) and the boiling of water (often a common volatile in eruptions, but also an addition during phreatomagmatic eruptions). Fractoemission occurs during the fracturing of a material (in volcanic cases - magma) this then causes a the release of electrically charged atoms, ions and radiation in different circumstances. Fractoemission is thought to be the dominant charging process.
This is just a brief, and simplified overview, for those of you with access to journals and want a more detailed explanation, the following are articles on lighting in volcanic plumes.
James et al. 2008. Electrical Charging of Volcanic Plumes. Space Science Reviews 137, pp. 399-418
Mather and Harrison, 2006. Electrification of Volcanic Plumes. Surv Geophys 27, pp. 387-432
McNutt and Williams, 2010. Volcanic lightning: global observations and constraints on source mechanisms. Bulletin of Volcanology 72, pp. 1153-1167
I have posted three of my favourites below. The last photo of Krakatau just goes to show that it doesn't have to be a violent eruption to produce lightning! My personal favourite though is the one of Chaitén - very atmospheric.