It's all about how the vibrations from the strings resonates through the wood and how pronounced that resonation is. For example, maple is a very hard/dense wood, which gives it a bright response. George Lynch favored maple bodied guitars with maple necks (the fretboards were all different) and his tone is considered very razor like, which cuts through like no other. Mahogany, on the other hand, is a very porous wood and somewhat soft, and tends to sound darker and overall warmer, which is why Les Pauls have that famous 'chunky' sound they're known for.
There are many different tonewoods, but they all have their own characteristics sound wise. Some are brighter and tighter, and some are dull and lifeless (think of the agathis crisis a couple years ago).
Hope this helps...but definitely check out the warmoth link above, it has a good explanation on the different kinds of woods.