defaults write com.apple.screencapture type jpg
You can replace "jpg" with your desired file format (example: tiff, pdf, png, etc.). If you wish to change it back to defaults, Mac OS X originally grabs screens in png format. To activate the changes, just logout of your account and then log back in.
Want more tips and tricks like this? Visit TUAW's Mac 101 and Terminal Tips sections.