When I went to school (40 years) ago I was taught that "may" was to be used when asking a question (as in "May I have some candy?"and "can" was to be used when responding to a question (as in "Yes you can.") It seems that everyone today is saying "Yes you may" or "You may open your books..." Even the obituary writers use "may" as in "donations in lieu .... may be made to ...." Hardly anyone uses "can" in this context anymore. Please explain the proper usage of these two words. Thank you.
Also see: Can or May?

I think your teacher was correct back then; however the language has mutated (once more). When posing a question 'may' is frequently interchangeable with 'can'.

May (to me) seems more polite, perhaps to be used in situations where the familiarity is low.

"Can I have some food" = "May I have some food"
"Can we go to the cinema" = "May we go to the cinema"
"May we ask for your silence" = "Can we ask for your silence" <- Can sounds 'rude', a bit more demanding!

"Can you ask a question" but “May you ask a question" seems strange.
Can and May have very similar usage, and can be used in questions and replies, and in lots of situations, either works well.

However, in British English the essential difference (though there are others) is this; May introduces a possibily (a wish or Hope) and can introduces ability. Have a look at these examples.

I may see you tommorow (possible)

I can see you tommorow (able)