Can I downgrade/upgrade to the firmware version I want?

Check the top of the Cydia homepage to see the list of "SHSH blobs" saved for your device — these are the iOS versions possible to downgrade (or upgrade) to on this device.

What is SHSH? Why do I need it?

Apple has a system that tries to make sure you can only install the latest iOS firmware version: devices require their firmware installation to be verified (signed) by Apple during every restore or upgrade. Apple usually only signs a version while it's the latest version. This is designed to keep you from installing jailbreakable versions as Apple fixes exploitable bugs.

When you open Cydia, it automatically saves your device's available SHSH (signatures), so that you can use Cydia's signature server replacement to restore your device with those firmware versions later (after Apple no longer signs them).

Note: Access to saving SHSH is entirely based on Apple's servers and is not affected by your device's current version (or other properties). This means that Cydia can only save SHSH for firmwares being signed by Apple at the moment when you open Cydia, and after Apple releases a new firmware, Cydia has no way to save SHSH for any previous version, even if it's currently running on your device.

More details: Caching Apple's Signature Server (September 2009).

How do I use SHSH to downgrade or upgrade to a version?

Using redsn0w, you can "stitch" your saved SHSH blobs for your desired iOS version into the appropriate IPSW file (firmware file) and then use the resulting custom firmware file to restore your device. This fakes the required firmware signature process.

This is a procedure reserved for the bold and adventurous, with many possible error messages along the way (although they can generally be solved with some research).

Note that you can also manually save SHSH blobs for any device (even a non-jailbroken device) using a free tool called TinyUmbrella, and you can also use it to check the available SHSH blobs for your device.