Why do you ask?

Literal

Why ask [explanatory-question-の]?

なんで is the colloquial 'why,' more conversational than the formal なぜ. It can also mean 'how' or 'by what means' depending on context. The の at the end softens the question and asks for an explanation — characteristic of casual feminine speech but also widely used by men in casual contexts.