باید هر شکل را در یک minipage
قرار دهید. خود کد گویا هست و گمانم نیازی به توضیحات بیشتر نباشد.
\documentclass{article}
\usepackage{amssymb}
\usepackage{pgf,tikz}
\usetikzlibrary{arrows}
\usepackage{color,xcolor}
\begin{document}
\begin{figure}[!ht]
\centering
\begin{minipage}[b]{.48\textwidth}\centering
\definecolor{cqcqcq}{rgb}{0.7529411764705882,0.7529411764705882,0.7529411764705882}
\definecolor{ffcqcb}{rgb}{1.,0.7529411764705882,0.796078431372549}
\fbox{\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\clip(2.92,-0.9) rectangle (7.76,3.76);
\fill[line width=2.pt,color=cqcqcq,fill=cqcqcq,fill opacity=1.0] (5.,3.) -- (4.,3.) -- (4.,1.) -- (5.,0.) -- (7.,0.) -- (7.,1.) -- cycle;
\draw [line width=2.pt,color=cqcqcq] (5.,3.)-- (4.,3.);
\draw [line width=2.pt,color=cqcqcq] (4.,3.)-- (4.,1.);
\draw [line width=2.pt,color=cqcqcq] (4.,1.)-- (5.,0.);
\draw [line width=2.pt,color=cqcqcq] (5.,0.)-- (7.,0.);
\begin{scriptsize}
\draw [fill=ffcqcb] (5.,3.) circle (2.5pt);
\draw [fill=ffcqcb] (4.,3.) circle (2.5pt);
\draw [fill=ffcqcb] (4.,1.) circle (2.5pt);
\draw [fill=ffcqcb] (5.,0.) circle (2.5pt);
\draw [fill=ffcqcb] (7.,0.) circle (2.5pt);
\draw [fill=ffcqcb] (7.,1.) circle (2.5pt);
\draw [fill=ffcqcb] (4.,2.) circle (2.5pt);
\draw [fill=ffcqcb] (5.,2.) circle (2.5pt);
\draw [fill=ffcqcb] (6.,2.) circle (2.5pt);
\draw [fill=black] (5.,1.) circle (3.0pt);
\draw [fill=ffcqcb] (6.,1.) circle (2.5pt);
\draw [fill=ffcqcb] (6.,0.) circle (2.5pt);
\end{scriptsize}
\end{tikzpicture}}
\caption{$S_2(2,1)$ in $\mathbb{Z}^2$}
\end{minipage}
\hfill
\begin{minipage}[b]{.48\textwidth}\centering
\definecolor{cqcqcq}{rgb}{0.7529411764705882,0.7529411764705882,0.7529411764705882}
\definecolor{ffcqcb}{rgb}{1.,0.7529411764705882,0.796078431372549}
\fbox{\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\clip(2.04,0.24) rectangle (5.88,3.52);
\fill[line width=2.pt,color=cqcqcq,fill=cqcqcq,fill opacity=1.0] (4.,3.) -- (3.,3.) -- (3.,2.) -- (4.,1.) -- (5.,1.) -- (5.,2.) -- cycle;
\draw [line width=2.pt,color=cqcqcq] (4.,3.)-- (3.,3.);
\draw [line width=2.pt,color=cqcqcq] (3.,3.)-- (3.,2.);
\draw [line width=2.pt,color=cqcqcq] (3.,2.)-- (4.,1.);
\draw [line width=2.pt,color=cqcqcq] (4.,1.)-- (5.,1.);
\draw [line width=2.pt,color=cqcqcq] (5.,1.)-- (5.,2.);
\draw [line width=2.pt,color=cqcqcq] (5.,2.)-- (4.,3.);
\begin{scriptsize}
\draw [fill=ffcqcb] (4.,3.) circle (2.5pt);
\draw [fill=ffcqcb] (3.,3.) circle (2.5pt);
\draw [fill=ffcqcb] (3.,2.) circle (2.5pt);
\draw [fill=ffcqcb] (4.,1.) circle (2.5pt);
\draw [fill=ffcqcb] (5.,1.) circle (2.5pt);
\draw [fill=ffcqcb] (5.,2.) circle (2.5pt);
\draw [fill=black] (4.,2.) circle (3.0pt);
\end{scriptsize}
\end{tikzpicture}}
\caption{$S_2(1,1)$ in $\mathbb{Z}^2$}
\end{minipage}
\end{figure}
\end{document}