texlive 2014 on Linux mint 17.

\documentclass{article}
\usepackage{tocloft}  %if this line is commented, then toc will show up
\begin{document}
\tableofcontents
\section{sec1}
some text 1
\section{sec2}
some text 2
\end{document}


if tocloft is not used, then toc will show up in html.

command to compile is

htlatex foo.tex


Then view the file foo.html in same folder to see the missing toc.

This came up when I was trying to change the font size of the toc and used this package, which works ok with pdflatex, then noticed the toc is missing in the HTML file.

Both tex4ht and tocloft redefine table of contents mechanism, so they clash each other. Because you can't use tocloft settings with tex4ht anyway, it is best to to disable tocloft. From fast look at tocloft source code, it seems that we can use \if@cftnctoc conditional for this purpose, when set to true, no redefinitions take place. Fortunately, all redefinitions are done in \AtBeginDocument commands, which seems is time when .4ht files are loaded. So, we can introduce tocloft.4ht file, with really simple contents:
\@cftnctoctrue

Value of \if@cftnctoc is set to true. This file is loaded before tocloft redefinition commands check for value of \if@cftnctoc, so no redefinitions take place.