Strictly speaking, a correct SuDoKu puzzle should have exactly one solution. You can find some info about generating puzzles here and some code here (ANSI C) or here (Java, look at the Composer). Anyway, my favourite sudoku-generation method so far is LWP::Simple and this site ;)