gnuplot -e "set datafile separator \",\"; set term png; set output 'foo.png'; plot 'foo.csv'"
Personally, I would rather do
<foo.csv tr ',' ' '|gnuplot -e 'set term png;plot "-"'>foo.png
But I don't really use scripts for other gnuplot terminals, because custom tailoring for individual data set is always required to make any figure presentable. I usually go through ConTeXt to generate PDF file for its TeX features.