The dimensions of a kayak make a big difference when it comes to its handling out on the water, so size should definitely be one of the factors you weigh when selecting a boat.
To get a sense of the basic relationship between kayak size and handling, let's consider two extremes: the sea kayak and the whitewater kayak. The former--also called the "touring" kayak--is narrow and long, often about 15 to 19 feet from bow to stern. The whitewater kayak, by contrast, is a stubby boat that may be as short as 4 or 5 feet long.
A longer kayak will typically be faster than a shorter one, and also will adhere to a straight course more easily. A short kayak, meantime, is much easier to turn. A sea kayaker wants a boat that will slice keenly through the waves and maintain a bearing with minimal paddling effort, so the impressive length of a touring kayak makes sense. Someone addicted to running rapids, meanwhile, is less interested in a boat's inherent swiftness--the tumbling river is plenty fast enough--and much more concerned with its maneuverability in the face of rocks, logjams, and twisting bends. Hence the stubbiness of the whitewater kayak.
Most recreational kayaks fall in between those poles, spanning some 9 to 15 feet in length. If you're looking to make extended trips on bigger bodies of water, seek out a longer kayak: Your paddle strokes get more bang for their buck, and you're not constantly wasting energy to keep the prow pointing forward. If you're tracing a winding river or tunneling through mangroves, a shorter kayak gives you better agility.
Long kayaks are usually narrower than short ones, which must have a broader beam (or width) to support the weight of the paddler. A wider kayak feels more solid and well-balanced when resting on calm water--that is, it has greater "initial stability." In rough, broadsiding waves, though, or when the paddler is leaning off center, a slimmer kayak is more secure: It has the superior "secondary stability." It's also easier to flip upright if capsized. Meanwhile, greater beam translates to more mass to shove through the water, so wide kayaks are slower than slender ones.
So--the basic rule of thumb holds that a longer, slimmer kayak will be faster and track better than a shorter, wider kayak, which however will be easier to turn and feel more stable when upright. Bear in mind, however, that other elements of kayak design hugely influence a boat's behavior, including rocker, hull cross-section, and volume. You'll want to review these other elements alongside length and beam when choosing a kayak--always assessing them against your abilities as a paddler and the waters you intend to ply