
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, shadows}%<---------------add shadow
%\usepackage{default}
\begin{document}
\begin{frame}
\begin{tikzpicture}
\node[shape=circle,draw=black,fill=white, drop shadow] (A) at (0,2) {A};
\node[shape=circle,draw=black,fill=white, drop shadow] (B) at (0,0) {B};
\path (A) edge [loop above] node {} (A);
\path (B) edge [->] node[above] {} (A);
\end{tikzpicture}
\end{frame}
\end{document}
EDIT -- for better control over shading

You can also have better control over the color shading by adding the following line to the options of any node in []
drop shadow={top color=green,
bottom color=yellow!40,
shadow xshift=4pt,
shadow yshift=-4pt,}
Similarly the xshift and yshift give more precise control over the shadow placement
An example is reproduced below--- note-- the shadows can be applied to arrows also
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, shadows, shadows.blur}
%\usepackage{default}
\begin{document}
\begin{frame}
\begin{tikzpicture}
\node[shape=circle,
draw=black,
fill=white,
drop shadow={top color=blue,
bottom color=blue!40,
shadow xshift=2pt,
shadow yshift=-2pt,},
% blur shadow={shadow blur steps=1}
]
(A) at (0,2) {A};
\node[shape=circle,
draw=black,
fill=white,
drop shadow={top color=green,
bottom color=yellow!40,
shadow xshift=4pt,
shadow yshift=-4pt,},
% blur shadow={shadow blur steps=1}
]
(B) at (0,0) {B};
\path (A) edge [loop above] node {} (A);
\path (B) edge [->] node[above] {} (A);
\end{tikzpicture}
\end{frame}
\end{document}