The principle is simple: flash colored lights in step with music or other sounds.
"In the day", these could be obtained as ready to use accessories or as kits. Radio Shack sold units that were rather popular, these from a 1977 catalog:
Color organs sample sound and flash lights based either the sound intensity or frequency. The higher end units use analog or digital signal analysis to determine the sound energy in selective parts of the frequency spectrum and flash the lights accordingly.
The Adafruit Ampli-Tie project, using FLORA, has two different algorithms to light a string of Neopixel LEDs according to sound intensity. We will reuse much of the first Ampli-Tie algorithm's code. The more complex algorithm uses a good deal of floating point math, which is too large to fit on a Trinket or Gemma. The simpler algorithm fits with room to spare, using integer math. The code is slightly modified to give the effect one may want in a color organ. The user may alter this code to produce other effects for their own projects.