Understanding the fretboard on a guitar will improve your playing and understanding of how western music is represented between the strings and frets. Learning how notes are laid out on each string is simple. The following rules will help you unlock the mystery of the fretboard.
All of the strings on the guitar, except for G to B, are tuned in perfect 4ths. The 3rd string G followed by the 2nd string B is tuned in a major 3rd. This tuning allows for good position playing with the 4 fingers of the fretted hand. Playing chords to chromatic scales are all possible with good economic use of the fretted hand creating minimal sliding movement on the neck and fretboard.
Starting from the open string pitch, notes are added to the fretboard following standard western music guidelines. Each string is self contained in it's note placement and ultimately creates duplicate pitches. This is very different than an instrument such as a piano. For example, you can only play middle C one place on the entire piano keyboard. On the guitar you can play middle C on two different strings. You might initially think that the duplication of notes can be confusing. In reality this allows stringed instruments a huge advantage over other instruments. Patterns and shapes played in one area of the fretboard can easily be slid or transposed to another area of the fretboard changing keys on the fly. This allows the player to learn something once and be able to play that musical snippet in all keys of western music without having to physically adjust for sharps or flats.