The letters (E,A,D etc) refer to the note. The standard tuning for the guitar is E,A,D,G,B,E (Last E is two octaves higher than the lowest one).
Now, the numbers after each letter refer to the specific octave (Scientific pitch notation) of the note. As you know, there is more than one note named E. How to tell which one is which? With numbers! The number indicates the note's octave.
Here you can see the different C's:
So, E2 (lowest of your guitar) would be a third above C2 in the image above. A2 would a sixth above the C2 etc.
Generally, if you simply say you tune your guitar to E,A,D,G,B,E (without the numbers), it's the same thing. People with still understand you. But if you want to tell someone the exact octave of a note, you can use the aforementioned numbers. So, being thorough, the exact standard tuning of the guitar is the one you mentioned, which is: E2 A2 D3 G3 B3 E4.
Αs it has been mentioned in the comments, the guitar music is written one octave above than it's played. So, you wouldn't see guitar music in the bass clef.