The reason filters are so useful is precisely why we have the same kind of system in our own eyes (three different types of cone cells with sensitivity to different parts of the spectrum): they allow our instruments to see color.
Filters come in two types: broad and narrow. Broad filters are sensitive to a wide range of the spectrum (much like the cone cells in our eyes), while narrow filters are usually designed to block out everything but a specific (astronomically-useful) wavelength.
Usually, CCDs and other light-collecting devices don't give us a color image; rather, they just tell us how many photons they collected, which, at best, will give us a black-and-white image. In order to actually form anything close to a color image, we overlay three separate black-and-white images taken through three different filters. These three images, when given the colors of red, green, and blue, give a full-color image. If the three filters roughly emulate the sensitivities of the eye's cone cells, we get a true-color image; otherwise, we get a false-color image. Many of the most striking astronomical images are false-color, because not having to adhere to the spectral sensitivity of the eye allows astronomers to highlight the most interesting features of whatever is being examined.
Aside from making cool pictures, filters also give us a quick way to estimate the basic spectral characteristics of many stars at once. One of the most prominent ways in which this is done is the "B-V color" of a star, which is its magnitude in the B filter (which is broad and blue) minus its magnitude in the V filter (which is broad and somewhat redder). The higher the B-V value, the bluer a star is. Since the color of a star is related to its blackbody spectrum, we can correlate the B-V color to the temperature of a star. As such, the B-V color is the horizontal axis of one of the most important collective descriptions of stellar populations, the Hertzsprung-Russell diagram (the other axis is absolute magnitude, which is directly related to luminosity). Here's one for the M55 cluster:
We might be able to glean the same information by taking the full spectrum of each star one at a time, but that is far too labor-intensive to be practical at this time (let alone in the early 20th century, when the HR diagram was developed).
In contrast with broad filters like U, B, and V, which give rough information about a star's color and broad spectral characteristics, narrow filters allow us to concentrate on very specific wavelengths. Some of the most common are:
- "H-alpha filters" (6563 Angstroms), which highlight the first neutral hydrogen Balmer transition and are related to hot hydrogen gas in most stars and star-forming regions;
- "S-II filters" (6724 Angstroms), which highlight the first singly-ionized sulfur transition and track one of the products of later stellar evolution;
- "O[III] filters" (5007 Angstroms), which highlight a forbidden transition of doubly-ionized oxygen and as such reveal matter that is produced in dilute gas clouds being fed on by larger stars.
These three narrowband filters in particular form the "Hubble palette," and allow us to produce astronomical images in such a way that immediately illuminates the astronomically-interesting parts of an object. For example, in a typical photo of the nebula NGC 2237 (taken from http://www.mcwetboy.com/mcwetlog/2010/04/falsecolour_astrophotography_explained.php), the visible-spectrum image looks like this:
while the Hubble-palette image (H-alpha=green, S-II=red, O[III]=blue) looks like this:
You can clearly see the internal structure of the nebula here, while in the visible-spectrum image it's just a red blob. Not only that, but we know the specific composition of the clouds that we're seeing, based on their color in this false-color image, whereas before, we only knew how bright they were (there are many things that look red, but only one that looks the exact shade of red that would pass through a S-II filter, for example).