If you can’t tell one note from another, or have a pretty good idea of how tones change, it’s pretty difficult to play the guitar without being dependent on written music or tabs.
Learning to tell notes apart just by listening to them is what is called developing your “ear”. This skill helps you recognize when you are playing the correct note(s), when notes are higher or lower in pitch than others. And, of course, developing your ear helps you determine when instruments are in or out of tune.