The answer probably depends on where you are. Where I live "why do you ask" would be considered polite, "why do you want to know" a little less polite, "why are you asking me" considerably less polite. It would probably sound old-fashioned in most places, but one could say "If I may, why do you ask?"

Only top voted, non community-wiki answers of a minimum length are eligible