The program uses /dev/urandom as its source of randomness, which is the best source available on OS X and (essentially) what gets used to generate SSL sessions, FileVault keys, and the like. The program lets you specify the length of the password as well as the set of characters to choose from. If you use the -v flag, it'll tell you how large a keyspace you're drawing from.
You can easily use this program for one-off Web passwords. (Well, 'easily' if you're not put off by using the Terminal.) Just pipe the output to pbcopy, and then paste into the Web form; you never even have to see the password. This works in verbose mode, as well, since the messages are sent to STDERR. It might look as simple as this:
$ genpw | pbcopy
to generate a password and put it on the clipboard, if you're happy with the defaults. Or, it might look like this if you need a password for a Web site that restricts you to eight-letter (no digits or special characters) passwords, and if you want to get an idea of just how insecure that is:
$ genpw -vUln8
Generating a 8-character password
using /dev/urandom
and the following characters:
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
This password is drawn from a keyspace of 46 bits.
----8<----cut-here----8<----
jtZJIjoP
---->8----cut-here---->8----
Full documentation and help is available through perldoc; just run perldoc genpw to have all your questions answered. This program is also BSD-licensed, so you can do almost anything you might like to do with it. Anybody who wants to wrap a GUI around it is more than welcome to do so.

