First, I don't know if these sentences are correct, but the question is should I use any kind of article before an alphabet letter in these sentences below?
I got an E in math
Please give me a G
The A is the best grade
Let's take your examples one at a time.
I got an E in math/s is correct. You would never say *I got E..." or "I got the E"
"Please give me a G" would be correct if there were blocks on a table, each with a letter of the alphabet, and you were asking someone for a block marked G.
If there were only a single G block you might ask for "the G". You might even just say *please give me G", meaning the block marked G.
*The A is the best grade" rings false. You could say either *A is the best grade" or "An A is the best grade".
This is very much as you could say either "Audi is my favourite car" (meaning the Audi marque) or *An Audi is my favourite car".
You would say *the Audi" only if you had been comparing Audi to some other marque, such as a BMW. Then you might say the Audi is my preference or I prefer the Audi.