There is also some bash tricks that should be able to do that in one step. Let's see if I can work it out.
Code:
robbak@robbak-PC:~/testdir$ touch file-one
robbak@robbak-PC:~/testdir$ touch file-two
robbak@robbak-PC:~/testdir$ touch file-three
robbak@robbak-PC:~/testdir$ touch "with space-four"
robbak@robbak-PC:~/testdir$ for filename in *; do mv "$filename" "${filename/-/_}"; done
robbak@robbak-PC:~/testdir$ ls
file_one file_three file_two with space_four
robbak@robbak-PC:~/testdir$
Of course this may be a bashisim.