One of the most common ways to tune a guitar to a standard pitch is to use a piano. You need to know how to tune a guitar using a piano or some other fixed source if you want to play with other instruments or voices. This is the only way to ensure that everyone is playing by the same tuning rules. Besides, your guitar and strings are built for optimal tone production if you tune to standard pitch.
The piano is a great tool for tuning the guitar because it holds its pitch so well (needing only biannual or annual tunings, depending on the conditions). You can use an electronic keyboard or a well-tuned piano. Just play the note on the piano and adjust the corresponding open string on your guitar until the pitch is the same.
This method is a bit more subjective than an electronic tuner that gives you very specific feedback as to how much to adjust the guitar and when you have it just right, but with a bit of practice, you'll soon see why this straight-forward, time-honored method is so popular.