I am a graduate student, so I can only provide you the point of view of someone who has (and still does) asked vast amounts of questions to all kinds of people, both in person and by e-mail. I think some of my experiences might be useful to you, though hopefully you will get the point of view of someone who is on the receiving end of these sorts of questions. I don't know how best to organize my thinking on this issue, so I'll just make a list of do's and don'ts.
- My number one piece of advice is to not be bashful about asking questions. I can completely understand the insecurity, but I have never once in my life had someone get upset at me for asking a question (even what turned out to be a stupid one). The vast majority of the time, the person you ask is extremely flattered that you are interested in their work and enthusiastic that you have provided them with an opportunity to share the fruit of their sweat and tears with someone. And you can learn things from communicating with experts that don't appear in any book.
- Be polite. This means fully introducing yourself - I usually give my full name, current academic institution, and status (in your case, undergraduate). You can also inform them how you stumbled upon their work. Be sure to thank them for your time, just like you would anyone else whose help you are soliciting. I also think it's a good idea to write a short "thank you" e-mail if you get a helpful answer.
- Be formal, but don't overdo it. Do your best to use proper grammar and punctuation (including capitalizing letters, etc.) - this is required if you want your message to be taken seriously, and some people are very finicky about this sort of thing. But you don't really want to sound like a lawyer either.
- Be concise. If you have a ton of questions, pick a few that are most important (and which go most naturally together). Write only what is necessary to enable a complete and intelligent answer - your audience probably doesn't want a huge reading project. If you get a helpful answer, you can always write back.
- Be precise. Whatever mathematical language you need to use, make sure you are using it correctly. Make sure that your questions are written clearly and that they make logical sense. You should also provide a reasonably specific title for your e-mail.
- Try to ask the right questions. Your questions should have a clear and definite answer ("Can you explain what l-adic cohomology is?" is not a good question; "Do you know a counter-example if condition X is removed in theorem 5.2 of your book" is a good question). Also, your questions should be appropriate for the person to whom you are writing; don't e-mail Andrew Wiles with a PDE question, and don't ask Hartshorne how to solve one of his exercises. I think it is perfectly appropriate to ask and expert for references if you are interested in a somewhat obscure topic, but don't ask "what do you think would be a good introductory functional analysis book?" Finally, never ask a question that requires someone to do a long computation for you.
- Make a reasonable attempt to exhaust your other resources before you e-mail someone you don't know, and briefly outline what you did (e.g. who you asked or what you read). If you just read the Wikipedia page on gauge theory and you don't understand something, talk to people in your own department and look through some books before you e-mail Ed Witten. Also, look around on the webpage of the professor in question for lecture notes or survey articles that they might already have written; you may find that he or she has already anticipated your question.
- Keep an open mind. Sometimes you'll get a one line answer; sometimes you'll get a three page essay. I think it depends more on the style of the person answering than the nature of your questions.
I hope you find this helpful!