I found raspi2png easy to compile and use. You can get the source code and instructions how to compile at the link below:
https://github.com/AndrewFromMelbourne/raspi2png
To use, make raspi2png the working directory and type the command raspi2png. You can add a –delay parameter that will delay the snapshot for a specified number of seconds. The best thing about raspi2png is that I can use it over SSH.
Though I’ve not used it, an alternative is scrot. You can find a tutorial at the link below:
http://www.raspberrypi-spy.co.uk/2013/10/how-to-take-screenshots-on-the-raspberry-pi/