One quick and easy way to mount a cabinet onto a wall is through the use of a wedge bracket called a French cleat. For instance, when I built the utility cabinets in the article entitled Cabinets 101, I showed how to use a very strong French Cleat wedge bracket to mount the cabinet on the wall.
A French Cleat is simply a piece of dimensional lumber (the length of the cabinet) ripped in half on a table saw at a 45-degree angle. One half of the bracket is mounted on the wall and the other on the back of the cabinet. There is only one way to mount the bracket halves so that the bracket will work properly. As the picture shows, the lower bracket (attached to the wall) will support the upper bracket (attached to the cabinet), and the angle of the cut will force the cabinet to snug into the wall.
This mounting system is simple and sturdy, but does require some planning when building your cabinets. In the utility cabinet plans referenced above, there is a cover that conceals the French Cleat (which, in that case, was made out of a ripped 2x6).
When building less utilitarian cabinets that won't carry as much weight as the utility cabinets, one could easily build a wedge bracket out of a 1x6. The back of the cabinet would need to support the weight of the cabinet, so the cabinet back should probably be of the same stock (typically 3/4" plywood) used on the rest of the cabinet. The cabinet back would then simply be inset 3/4" from the wall edge of the cabinet sides (and thus the wall to which it is being mounted) to leave a space for the brackets. The fact that the inside of the cabinets would be 3/4" shallower than it appears from looking at the outside of the cabinet would likely never be noticed by the naked eye.
Once the cabinet is mounted, a couple of screws installed through the cabinet back into studs in the walls will help prevent the cabinet from being lifted up off of the French Cleat.