A quick addition to the floating whammy bar tuning method - if you've just totally replaced the strings on your guitar, tuning up can take a while. Once you've gotten the strings on and have left them to stretch for a bit, start from the bottom E. Tune this quite a lot sharp - to F or G maybe. Next string, tune a bit less sharp. Next, even less sharp. The top E should be maybe a semitone, half a semitone out. Now go back to the bottom E and start again, trying to tune a lot closer to the note this time. After a few repetitions of this you should be in tune.

By the way, tuning by comparing a fretted note to an open note can be very bad, because when you push the string down onto the fret, you are stretching it. This especially goes if you've got an acoustic with high action or heavy strings. Usually I just tune my bottom string on the acoustic to some random approximation and say to hell with it. It's going to go out of tune any time I fret it anyway.

The all-time best way to tune would probably be to get a digital tuner. Look for one with both a jack socket to plug an electric into and a built-in mic (for tuning acoustics) and reference tone generator - good for putting a new set of strings on your guitar. I had one of these, but it went haywire. Incidentally, some models can also be used to tune other instruments such as a flute. My guitar FX unit also includes a tuner, albeit without a mic.

Contrary to wim's wu, if you're playing with distortion and you're planning to play any more than one note (and you're not using dissonance) it's quite important to be in tune. A power chord on a badly tuned guitar will sound pretty weird, and when you start adding thirds and so on into the equation, tuning is pretty important.