There appears to be no easy way to toggle visibility of hidden files or folders in OS X. This video describes a possible solution that makes use of Automator, Snow Leopard Services, and a small bash script.

Here’s the code that I used.

show_status=`defaults read com.apple.Finder AppleShowAllFiles`
if [ $show_status == 'NO' ]; then
show_status=’YES’
else
show_status=’NO’
fi

defaults write com.apple.Finder AppleShowAllFiles $show_status
killall Finder