Here is one way to do what you want. I started with your code and added and changed a few things. A no-so-brief summary:
- I renamed
siteref@ as thmref@ throughout as this made more sense to me:)
- I have wrapped the theorem environment inside a
\NewDocumentEnvironment, called Theorem, that takes two arguments: the optional argument to the theorem environment and a (mandatory) label. The label is used to define a thmref@<label> macro, which is used to store the page numbers that contain references to the theorem. At the end of the Theorem environment the \xref command is called in order to automatically add the cross-reference information.
- Rather than writing a
\SiteRef command to the auxfile every time \ref is called I have used \AtEndDocument to write it only once using \SaveTheoremRef.
- I have made the
\ref etc smart enough to only save "thmref" information for references associated with theorems. Previously this was stored in the aux file whenever \ref was used.
- The code works with
\ref and \cref. I haven't added \Cref but that is trivial to do.
- I had to change the
\xref command as it didn't work for me with multiple references. I also made it print only one page reference for each page and to use page or pages depending on the number of pages that contain references to the theorem.
- If there are no references,
No references is printed.
EDIT
I have changed the definition of \@theoremref so that it now allows references to occur before the theorem. The cost is that thmref@<label> references are now constructed for all references, not just theorems, but they are only stored in the aux file for theorems. At the same time I added an "and" between the last two page references when there is more than one reference, which was slightly tricky, and I fixed a bug in the original version of the code by putting the embedded theorem environments into their own group. I removed the unnecessary packages and renamed \xref as \AddTheoremReferences to avoid name conflicts as I think that \xref might be defined in some package(?). Finally, as requested in the comments, I allowed for multiple labels being passed to \ref{...} and friends.
Here is the output from the first page of my MWE incorporating these changes:

and here is the code:
\documentclass{article}
\usepackage{etoolbox}
\usepackage{amsmath,amsthm,amssymb,thmtools}
\usepackage{hyperref}
\usepackage{cleveref}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\makeatletter
% This command is written to the aux file by \SaveTheoremRef, hence
% allowing us to access the cross-referencing data via \thmref@aux@<label>
\newrobustcmd*\TheoremRef[2]{\csgdef{thmref@aux@#1}{#2}}
% save theorem reference data. Called via \AtEndDocument{...}
\newrobustcmd*\SaveTheoremRef[1]{
\ifcsdef{thmref@#1}{%
\immediate\write\@auxout{\string\TheoremRef{#1}{\csuse{thmref@#1}}}%
}{}
}
% stores page reference data in thmref@<label>
\newcommand\@theoremref[1]{%
\def\do##1{\ifcsdef{thmref@##1}{\csxappto{thmref@##1}{,\number\thepage}}%
{\csxdef{thmref@##1}{\number\thepage}}%
}%
\docsvlist{#1}%
}
% Overwrite definitions of \ref and \cref. Since other packages such as
% hyperref and cleverref change these this should be done at the
% beginning of the document.
\AtBeginDocument{
\let\originalref\ref
\renewcommand*\ref[1]{\originalref{#1}\@theoremref{#1}}
\let\originalcref\cref
\renewcommand*\cref[1]{\originalcref{#1}\@theoremref{#1}}
}
% \AddTheoremReferences<label> prints the cross-referencing information for theorem <label>
\newrobustcmd*\AddTheoremReferences[1]{%
\ifcsdef{thmref@aux@#1}{% proceed only if thmref data exists
\def\@tempa{0}% used to check for repeats
\@tempcnta=0% used to check for plural
\def\@thmref{}% will contain cross-referencing hyperlinks
\def\do##1{\ifnum##1=\@tempa\relax% skip over repeat references on each page
\else%
\ifnum\@tempcnta=1% skip \@tempcnta=0
\xappto\@thmref{\noexpand\hyperpage{\@tempa}}% first page reference
\else\ifnum\@tempcnta>1% already have ref so add a comma
\xappto\@thmref{, \noexpand\hyperpage{\@tempa}}%
\fi%
\fi%
\global\advance\@tempcnta by 1% increment reference counter
\edef\@tempa{##1}% store to check for repeat next time
\fi%
}
\xdef\@@thmref{\csuse{thmref@aux@#1}}
\expandafter\docsvlist\expandafter{\@@thmref}
\typeout{Refefenced: \the\@tempcnta.}
\ifnum\@tempcnta=1% only one reference
\noindent[Referenced on page \expandafter\hyperpage{\@tempa}]%
\else% at least two references so add an "and"
\noindent[Referenced on pages \@thmref\space and \expandafter\hyperpage{\@tempa}]%
\fi%
}{\noindent[Not referenced]\@latex@warning@no@line{Theorem reference `#1' is not defined}}%
}
\makeatother
\usepackage{xparse}
% \begin{Theorem}[heading]{label} ... \end{Theorem}
\NewDocumentEnvironment{Theorem}{ o m }
{\AtEndDocument{\SaveTheoremRef{#2}}
\IfNoValueTF{#1}{\begin{theorem}}{\begin{theorem}[#1]}
\label{#2}
}
{\end{theorem}\AddTheoremReferences{#2}}
\setcounter{page}{11}% for testing purposes only
\begin{document}
A reference to \cref{fanciertheorem}.
\begin{Theorem}{fancytheorem}
Fancy Theorem
\end{Theorem}
\begin{Theorem}[Really fancy!]{fanciertheorem}
Fancier Theorem
\end{Theorem}
\begin{Theorem}[Plain theorem]{plaintheorem}
Plain Theorem
\end{Theorem}
\newpage\section{page two}
\cref{fancytheorem,fanciertheorem}
\ref{fanciertheorem}
\newpage\section{page three}
\ref{fanciertheorem}
\end{document}
\docsvlistcommand inside\@theoremref. (The macro\AddTheoremReferencesalso processes comma separated variables, or csv lists, using\docsvlist.) Done! – Jan 19 '17 at 06:25\ifx##1@\relaxand, in fact, this was failing whenever the page number was greater than 9. I have made the code more efficient by removing the@'s from the lists of references (this was a sleight-of-hand to avoid worrying about adding a comma that became unnecessary when I allowed the new\crefand friends to accept multiple references). The output is the same except that now it works! I have changed the page number to 11 in the MWE to show this. – Feb 20 '17 at 00:05