Choosing the right rod has many factors, one of those factors being rod length.
And, more often than not, the rod length is gonna depend on what type of fishing you want to do, and the areas you want to fish. There also seems to be some variation depending on the types of lures and casting techniques you'll be using.
Most rods for any type of freshwater fishing are going to be between 5' and 8'. The longer the rod is, the farther you can cast and the harder you can hook your fish for better control. But with length also comes less accuracy, so casting around docks and other structures requires a shorter rod with more accuracy. Shorter rods are also easier to transport.
Check out image 2 for general length guidelines for a beginner, and images 3-5 for length recommendations based on type of lure in case you have a lure type on hand you want to use.