You probably use something like this in your ~/.vimrc
to automatically open NERDTree:
:autocmd VimEnter * NERDTree
You just need to add a conditional, e.g. to suppress the opening when any files are passed to Vim:
:autocmd VimEnter * if argc() == 0 | NERDTree | endif
As the VimEnter command fires after buffers have been loaded, you can also check for the current 'filetype'
value to suppress only, say, Haskell files:
:autocmd VimEnter * if &filetype !=# 'haskell' | NERDTree | endif