Getting a bike that fits well is very important. The good news is that bikes are relatively adjustable, so as long as the frame is the correct size you can fine-tune the fit relatively easily. Saddle height is pretty trivial to adjust and the saddle can also be moved slightly forward or backward with relative ease. Adjusting the front end of the bike generally involves replacing the stem, which controls not only how far the handlebars are from the frame but also the height of the handlebars.
Road bikes can come in both standard (S, M, L) sizes and numerical sizes (54, 56, etc.). The numerical measurement is generally the length of the seat tube but, unfortunately, not all manufacturers measure it the same way. Therefore, the same numerical size across different brands can fit very differently. Most bike manufacturers include size charts that list a height range for each frame size. If it looks like you’re between sizes, it’s probably best to choose the smaller size as it’s easier to make sizing accommodations on a smaller frame.