An easy way is
\documentclass{article}
%\usepackage{amsthm} %% uncomment to see the difference
\newtheorem{innercustomthm}{Theorem}
\newenvironment{customthm}[1]
{\renewcommand\theinnercustomthm{#1}\innercustomthm}
{\endinnercustomthm}
\begin{document}
\begin{customthm}{8}\label{eight}
Every theorem must be numbered by hand.
\end{customthm}
Here is a reference to theorem~\ref{eight}.
\end{document}
You can also use the optional argument for attribution:
\begin{customthm}{99}[Somebody]\label{ninetynine}
Statement.
\end{customthm}
A more generic interface for defining several of these environments; this doesn't respect theorem styles; it could be adapted, though.
\documentclass{article}
\usepackage{amsthm}
\newtheorem{innercustomgeneric}{\customgenericname}
\providecommand{\customgenericname}{}
\newcommand{\newcustomtheorem}[2]{%
\newenvironment{#1}[1]
{%
\renewcommand\customgenericname{#2}%
\renewcommand\theinnercustomgeneric{##1}%
\innercustomgeneric
}
{\endinnercustomgeneric}
}
\newcustomtheorem{customthm}{Theorem}
\newcustomtheorem{customlemma}{Lemma}
\begin{document}
\begin{customthm}{8}\label{eight}
Every theorem must be numbered by hand.
\end{customthm}
Here is a reference to theorem~\ref{eight} and
one to the important lemma~\ref{life-universe-everything}
\begin{customlemma}{42}\label{life-universe-everything}
This lemma explains everything.
\end{customlemma}
\end{document}
ADDITION
Support for cleveref
was asked in comments.
\documentclass{article}
\usepackage{amsthm}
\usepackage{hyperref}
\usepackage{cleveref}
\newtheorem{innercustomgeneric}{\customgenericname}
\providecommand{\customgenericname}{}
\newcommand{\newcustomtheorem}[2]{%
\newenvironment{#1}[1]
{%
\ifdefined\crefalias\crefalias{innercustomgeneric}{#2}\fi
\renewcommand\customgenericname{#2}%
\renewcommand\theinnercustomgeneric{##1}%
\innercustomgeneric
}
{\endinnercustomgeneric}%
\ifdefined\crefname\crefname{#2}{#2}{#2s}\fi
}
\newcustomtheorem{customthm}{Theorem}
\newcustomtheorem{customlemma}{Lemma}
\begin{document}
\begin{customthm}{8}\label{eight}
Every theorem must be numbered by hand.
\end{customthm}
Here is a reference to \cref{eight} and
one to the important \cref{life-universe-everything}
\begin{customlemma}{42}\label{life-universe-everything}
This lemma explains everything.
\end{customlemma}
\end{document}
The \ifdefined
bits allow for the solution to be independent on cleveref
.