When you buy a bike, it’s best to try potential choices out for size. But you can get a good idea of what size to start with by measuring your inseam.
That, coupled with the charts at Bike Size Chart, can help you find the right bike size. They have charts for city, mountain, road, BMX and children's bikes. They explain how to measure your inseam like so:
Take off your shoes. Stand against the wall. Place your feet apart. Put a book between your legs, with its spine firmly up against your crotch. You should feel as if you are seated on a bicycle saddle. Have someone measure from the floor to the spine of the book.
Based on your leg length (or height in the case of BMX and children's bikes), Bike Size Chart will display your corresponding seat tube, crank size, and bike size information.
Even with an idea of your measurement and corresponding size, you'll obviously need to swing by a local bicycle shop and try bikes out for yourself. However, this should give you a good starting point.