In case splitting the CV into different files is unfeasible, here's a possibility: we absorb each section in a macro and use it when we want.
The example is drawn from the template in the documentation of moderncv.
\documentclass[11pt,a4paper,sans]{moderncv}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}
\setlength{\footskip}{40pt}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage{environ}
\makeatletter
% a helper macro
\def\g@addto@macroname@exp#1#2{%
\expandafter\g@addto@macro\csname#1\expandafter\endcsname\expandafter{#2}}
% the main environment
\NewEnviron{cvsection}[2][]{%
\if!#1!\def\cvsection@key{#2}\else\def\cvsection@key{#1}\fi
\global\@namedef{thecvsection@\cvsection@key}{\section{#2}}
\g@addto@macroname@exp{thecvsection@\cvsection@key}{\BODY}%
}
% the command for printing the information
\newcommand{\usecvsection}[1]{\@nameuse{thecvsection@#1}}
\makeatother
% personal data
\firstname{John}
\familyname{Doe}
\title{Resumé title}
\address{street and number}{postcode city}{country}
\mobile{+1~(234)~567~890}
\phone{+2~(345)~678~901}
\fax{+3~(456)~789~012}
\email{john@doe.org}
\homepage{www.johndoe.com}
\extrainfo{additional information}
%\photo[64pt][0.4pt]{picture}
\quote{Some quote}
\begin{document}
\makecvtitle
\begin{cvsection}{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\end{cvsection}
\begin{cvsection}[MT]{Master thesis}
\cvitem{title}{\emph{Title}}
\cvitem{supervisors}{Supervisors}
\cvitem{description}{Short thesis abstract}
\end{cvsection}
\begin{cvsection}{Experience}
\subsection{Vocational}
\cventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}%
Detailed achievements:%
\begin{itemize}%
\item Achievement 1;
\item Achievement 2, with sub-achievements:
\begin{itemize}%
\item Sub-achievement (a);
\item Sub-achievement (b), with sub-sub-achievements (don't do this!);
\begin{itemize}
\item Sub-sub-achievement i;
\item Sub-sub-achievement ii;
\item Sub-sub-achievement iii;
\end{itemize}
\item Sub-achievement (c);
\end{itemize}
\item Achievement 3.
\end{itemize}}
\cventry{year--year}{Job title}{Employer}{City}{}{Description line 1\newline{}Description line 2}
\subsection{Miscellaneous}
\cventry{year--year}{Job title}{Employer}{City}{}{Description}
\end{cvsection}
\usecvsection{Education}
\usecvsection{Experience}
\usecvsection{MT}
\end{document}
Each section appears in a cvsection environment that has an optional argument which should be used in case the section title does not consist only of plain ASCII characters. I've used it for "Master Thesis" although it wouldn't be necessary in this case.
After defining the various sections, you can print them in the order you prefer, using the section title or the key if the optional argument has been used for a particular section.