I just built this storage rack for my basement out of 2x4s and plywood. It is relatively stable but does have some front to back wobble. More than I would like. Is there a way to increase the stability of the unit? I've read something about adding diagonal braces but am unsure how exactly that would work. Any help would be much appreciated.
Most things we build are rectangular, and rectangular structures are prone to racking, which is illustrated in this drawing of a deck, but the same problem affects your rectangular shelves:
As you see a structure can collapse due to racking if the joints flex without tearing apart.
There are various ways to counter racking. Other shapes, like triangles and trapezoids, are not prone to racking. In the picture, by adding knee braces, you attach the rectangle to triangles, which are not prone to racking.
Another way is to make joints that are not as flexible, it looks like the vertical boards in the front of your shelf are attached in a way that won't flex and allow your shelf to rack left to right.
Another way to prevent racking is to attach a sheet over the rectangle. For example, if you attached plywood over the sides of your shelf unit, there's no way it could rack front to back. The sheathing doesn't have to cover the whole side. You could add gussets - just a triangle of plywood in the four corners - and make the shelf nice and solid.
I would consider
You probably can't retrospectively improve the joinery but it is worth noting that some methods of fixing pieces of wood together result in a more rigid joint. A well-made and glued mortise and tenon is one of the most rigid joints, more so than say a single screw.
Adding diagonal bracing can make a very large improvement, This can take the form of struts, tension-cables or sheets.
Simply bolting the top rear rail to the wall behind it (perhaps through a shim or solid spacer) will in many cases stop any forward and backward wobbling. If the shelves are free-standing in the middle of a room, your options are much more limited - but in a basement maybe a tall post secured to both shelving and to a joist might be feasible.