It may be helpful to read the perspective of someone reasonably senior (alas!), so here it goes.

Although I do not remember getting emails from undergraduates, I do get occasional emails from PGs, postdocs and other researchers in my community whom I have never met or heard from before. If the message is addressed to me and is clearly not spam, then I will invariably respond, if only because I think it polite to do so. However the type of response can depend on a number of factors.

For me to truly engage with the email, it has to satisfy a number of criteria. First of all, it should be clear that the message is serious, that the sender has done her/his homework, and that the tone is polite without necessarily being too formal. It helps to feel that I am "uniquely" (whatever that means) qualified to answer the question. Usually this means that question refers to something I have written.

If I know that the question is answered in the literature, I will point to the relevant sources with some commentary and perhaps a short guide to the literature. On the rare occasions I cannot get away with that, I will send a detailed answer.

It's nice to receive an acknowledgment of receipt, if only to say 'Thanks'. I almost always sign my emails with my first name, and hence I will not get offended if the next email is addressed to me in that way.

I prefer plain text email to HTML, institutional email addresses to sophomoric_name@hotmail.com, and I'm more likely to take seriously emails which are succinct, carefully punctuated, and have correct spelling and grammar.

And of course it is important to know at which stage in their career the sender finds her/himself, if only to know at which level to pitch the response.