One proposal, advocated by Sir Fred Hoyle, is that within comets there are perhaps bacterial organisms, and that periodically the accumulated biogenic waste gases bubble to the comet surface and erupt into space. This would seem to explain why comet nuclei can be active even though they are far away from the warming rays of the Sun. However, the explanation requires you to believe that there are living organisms within comet nuclei, and there is no evidence for such things, especially in the recent fly-by data of Halley's Comet back in 1986.
The more conventional explanation is that within a few times the distance of the Earth from the Sun, enough solar radiation falls upon the nucleus of the comet to begin evaporating volatile ices. Comet Schwassman-Wachmann is a periodic comet which returns every 16 years is well known for its sudden, and unexplained brightness changes which cause it to appear 100 times brighter than when in its 'normal' state. The semi-major axis of its orbit carries it 6.4 AU from the Sun, just outside the orbit of Jupiter ( 5.2 AU), so one would think that the conditions are too cold for much of its orbit to produce eruptions of explosive evaporation. We know so little about the composition of comets, that it is hard to predict all of the ways in which comet nuclei can behave .We know from flybys of Halleys' Comet and from ground-based studies of other comets, that they emit methane, carbon monoxide, sulfur and hydroxyl among other compounds, so the trapped ices are rich in organic molecules which get photo-dissociated once the comet gets close to the Sun. There is also LOTS of dust, and this causes comet nuclei to have a higher absorptivity than a similar quantity of pure ice. Depending on the distribution of this dust inside the comet, sunlight can be absorbed more in one area than in another and cause hot spots to develop. From these, plumes of gas are ejected explosivly. Halley ejected 30 tons per second of gas and 5 tons per second of dust during its inner solar system visit. Most of this ejected in plumes.
The bottom line is that we do not know exactly why some comets flare in brightness, but studies of Halley's Comet suggest that the process may simply be a variation on a common theme, not some exotic 'biogenic' process.