I assume you are using the thesis.cls in the contrib/thesis directory of CTAN, which indeed does produce centered headings. (This is the only file of that name on CTAN and seems to be included in the MikTex distribution, but not TeXLive.)
There is a nocenter package option that affects headings at all levels. But to adjust just sections and subsections, it appears that you need to cut and paste code from the class file (the full path to which is give in the log file). Specifically you need to redefine \section and \subsection. As these commands use code containing the @ character you will need to include this in between \makeatletter and \makeatother.
A minimal example showing this is:
\documentclass{thesis}
\makeatletter
\renewcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\raggedright
\reset@font\s@font}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedright
\reset@font\ss@font}}
\makeatother
\begin{document}
A full line of text to pad out the example and show the spacing is as
requested in the posted question.
\section{Middle}
A full line of text to pad out the example and show the spacing is as
requested in the posted question.
\subsection{Last}
A full line of text to pad out the example and show the spacing is as
requested in the posted question.
\end{document}

thesis.clsaround. Can you point to a net address for the one you're using? – egreg Jul 16 '12 at 11:48