What does the colour of a light bulb depend on? There are light bulbs of different colors available (red, green, yellow, white, etc). What does the color depend on? Is it on the temperature of the filament? 
 A: For starters, even though you don't say it explicitly, I'm going to assume you're talking about incandescent light bulbs (since you mention filaments in your question).  There are many other types of light bulbs, such as compact fluorescent lamp (CFL) or light-emiting diodes (LED).  Each of these different types work somewhat differently, and as a result, the colors produced depend on slightly different things.
For your typical white incandescent lightbulb, the lightbulb acts as a black body.  The light (and heat) emitted from the lightbulb is the result of black body radiation. Compared to other black bodies, the typical lightbulb is not a particularly good or efficient one, but we can still describe it using black-body radiation.  Black body radiators have what's called a color temperature.  As you can guess by the name, color temperatures describe the relationship between the temperature of the black body, and the frequencies of light emitted from the object.  By changing the temperature of the black body, the frequencies of light (which we perceive as color, sort of) vary as a result.  A typical incandescent light has a color temperature of 3,000K.  Different material filaments emit different frequencies of light, but for an incandescent light, this is mostly because the filament is heated to a different color temperature.
In lights like discharge lamps, etc, however, the materials used matter much more, because the excitations (and subsequent falls back to ground state) of the electrons release discrete energies/frequencies of light, which is very characteristic of the material.  For example, sodium discharge lamps have a very characteristic orange/yellow glow, because sodium dominantly emits photons at the frequency of yellow light.
LEDs are made by "doping" semiconductors with certain elements, so that the electron excitations (and falls back to ground state) release specific frequencies of light as well.  Hence blue LEDs are doped differently than red LEDs, etc.
A: I am going to answer this on the assumption you are talking about an incandescent lamp.
A tungsten filament is heated by the current flowing through it, and starts to behave like a black body radiator. Now a tungsten filament is not a perfect black body: the emissivity is a function of wavelength and has been characterized (see https://dspace.mit.edu/bitstream/handle/1721.1/4755/RLE-TR-328-04734719.pdf?sequence=1). From that paper, figure 29 is reproduced here:

This shows there is a weak relationship between emissivity and temperature - and that emissivity at shorter wavelengths is slightly higher (making the light "more blue"). Do pay attention to the vertical scale - variation is from roughly 0.42 to 0.48, which is why I call it a "weak" relationship.
This is a very small effect compared to the actual spectral characteristics due to the over all black body spectrum which is a strong function of temperature as shown in the following figure ("Black body" by Darth Kule - Own work. Licensed under Public domain via Wikimedia Commons - http://commons.wikimedia.org/wiki/File:Black_body.svg#mediaviewer/File:Black_body.svg):

The equation represented here is Planck's Law - it represents a victory for quantum mechanics because it explains why there is no UV catastrophe, although according to that link it was actually Einstein, not Planck, who made the connection...:
$$B_\lambda(T)=\frac{2hc^2}{\lambda^5}\frac{1}{e^{hc/\lambda k_B T}-1}$$
Now the melting point of tungsten is just below 3700 K, so you can see that the spectrum will be heavily biased towards the red - which is why you need to make a "white balance correction" when you take an indoor photograph with incandescent light (your camera usually does this automatically).
From this red-biased starting point you can now select certain wavelengths by filtering out certain components. An example of this is the GE Reveal light - when you look at the light bulb itself it has a blue-ish tint, and the light that it gives off looks "very white" - because it has filtered some of the yellow light to give a spectrum that looks more like sunlight (the surface of the sun is much hotter than a tungsten filament and gives off what we usually consider "white" light):

source of comparison: http://www.gelighting.com/na/business_lighting/spectral_power_distribution_curves/
Similarly, you can create any color of light bulb by filtering out the colors you don't want. This filtering is very inefficient - you remove light from certain wavelengths which reduces the over all power of the light.
Fluorescent tubes typically use a different mechanism to create color. The gas inside the tube typically emits ultraviolet light, and phosphors on the inside of the tube convert this energy into longer wavelengths. Mixing the phosphors allows almost any spectrum (although the spectrum often has significant peaks, so that not all wavelengths are represented. This means that while the light may appear "white", it may have a poor color rendering index).
A: If it is incandescent, then temperature to some extent, but mostly the light of the wrong color gets filtered out by the colored glass bulb. If it is something like electric discharge lamps, then it is the gas used (eg sodium vapor) or the phosphors coating the inside of the tube converting UV to visible light/color (eg mercury vapor UV emissions). With LED lights it is either near UV being down converted by a phosphor, or the emission is directly tuned to be at a specific wavelength (color). That's one reason why colored LEDs are so efficient - nothing has to be filtered out.
