The length should be dictated by your location. If the bench will be longer than 8 feet, you should build another set of legs under the center. The height should be about 34 inches high. But depending on your height you may want that higher or lower. A good rule of thumb is to stand with your arm straight down and your palm parallel to the floor. Measure the distance from the floor to your palm and build it that high. The width should be about 27-28 inches, which equates to 5 2/6's or 8 2x4's.
I have listed the dimensions and bill of materials for a bench 5 feet long, 27 ½ wide and 34 ½ high.
Start by nailing the bench's top boards to the two boards that run perpendicular underneath using 16d nails. The boards for our example size are five 2x6's 5 ft. long. Squeeze the top boards together as tight as you can, since little items will be finding their way through any cracks for years afterwards. The boards that will run underneath are 2x4's 22 in. long and should be set in from the edge 6". Flip the top over and nail the front and back frame boards to the end boards. These are 2x4's, 3' 9" long and go between the two nailed to the top.
Next nail the legs into the 4 corners of the frame under the bench. The legs are 2x6's cut 33 in. long. Nail the long 2x4 diagonal board that runs along the back of the bench to the two back legs. Turn the bench back right side up and nail in the stretchers that join the legs on both sides and the two diagonal boards on either side. These four boards are 2x4's.
You can make a shelf underneath by running boards from one side to the other supported by the stretchers between the legs. You may also wish to add a backsplash board to keep things from falls behind the bench. Nail a 2x4 to the top of the bench along the length of the back.