How to write quotation marks in math environment?

If you use ", these are no different in text mode, or math mode in terms of how you use them, although the spacing is a slightly different. However, as Mico pointed out is you use the recommended approach of ```...''` to obtain the double quotes, then this needs special handing inside math mode.

If you desire single quotes you can use the solution from How to get the closing single quote in math mode:

enter image description here

If possible you should put the quotes outside of math mode.

Code:

\documentclass{article}
\usepackage{amsmath}

\DeclareMathSymbol{\mlq}{\mathord}{operators}{``}
\DeclareMathSymbol{\mrq}{\mathord}{operators}{`'}


\begin{document}
\textbf{Text mode:}\par
``abc'' \qquad\qquad\quad `abc'

\bigskip
\textbf{Inline Math:}\par
$``\lim_{x \to 0} f(x)"$ \quad $\mlq\lim_{x \to 0} f(x)\mrq$

``$\lim_{x \to 0} f(x)$'' ~\quad `$\lim_{x \to 0} f(x)$'

\bigskip
\textbf{Display Math:}
\[ 
  ``\lim_{x \to 0} f(x)"  \qquad \mlq\lim_{x \to 0} f(x)\mrq 
\]
%
\[ 
  \text{``$\lim_{x \to 0} f(x)$''}  \qquad \mlq\lim_{x \to 0} f(x)\mrq
\]

\end{document}

My solution of choice

\newcommand{\menquote}[1]{\ensuremath{\text{\textquotedbl} #1 \text{\textquotedbl}}}

using the amsmath package.