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, the utility cabinets in the article entitled Cabinets 101, you can learn 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. Gravity does all of the work, as the weight of the cabinet forces the upper bracket downward and toward the wall, holding the entire system secure. A couple of screws through the lower back wall of the cabinet into wall studs will keep the bottom from tilting outward and secure the entire cabinet.
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). If the cabinet is a closed cabinet, there may not be a reason to cover the French cleat, but that is simply a matter of style rather than usability. However, for open, exposed cabinets, plans to use this type of mounting system should include a well thought out method for covering the exposed cleat.
The other option for mounting cabinets is to simply use heavy-duty deck screws and drive the screws through the back of the cabinet into wall studs. There are a couple of caveats that must be considered in this type of installation as well. First of all, there should be at least two studs into which the screws can be driven, as the entire weight of the cabinet will rest on those screws. Additionally, the back of the cabinet must be built using 3/4-inch plywood as opposed to the standard practice of using 1/4-inch plywood on the cabinet back to help keep the carcass square.
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.