It is important to know every note on the guitar. No matter what fret you hold on what string, your goal should be to be able to know each note without thinking twice. Start by learning the names of each string. The use of an acronym is helpful (ex. Eddie Ate Dynamite Good Bye Eddie), but eventual you should be able to name them: E A D G B E
There are certain reference points that will help you keep tabs on where you are on the fretboard. The dots, for starters, are there for you to reference what fret number you are on. The single dots are on odd numbered frets. The double dot is on the 12th fret. The 12th fret is the same note as its corresponding open string, just one octave higher. For example, if you are on the E string, then the 12th fret is…E. The same goes for every other string. If you are on the A string, then the 12th fret is A. If you are on the D string the 12th fret is D, etc.
Next, get to know the relation of the fifth fret to the next higher string. The 5th fret is the same note as the open string underneath it. For example, the 5th fret on the E string is the note of A. The 5th fret on the A string is D. The 5th fret on the D string is G. Now here is where it gets a little tricky. The 4th fret on the G string is B (not the fifth). There is a reason for this, but for now just get down the relations of each string and remember that for the G-to-B it’s the 4th fret. Now lastly, the 5th fret on the B string is E. And that is all six strings!
There are other things that can help you to know the fret board; but use these as a starter. Get to know them well.
Know your guitar. Love your guitar. Thank your guitar :p