How do I know what is the right bottom bracket for my old road bike? I've got an old road bike. I'm not exactly sure what the frame is as it was repainted. I've reason to believe the that bottom bracket is wrong because the crankset ring is too close to the chainstay. 

The crankset is a shimano golden arrow, similar to this picture https://c2.staticflickr.com/8/7067/6994214279_d19b265a9a_z.jpg


I'm concerned about the offset as you can see above in this picture. On the non drive side the crank looks like it is designed to be much further in and on the drive side it is really close in.

Please advise me how one knows which bottom bracket is right for X bike. Shell width is reasonably obvious because otherwise it wont fit but what about axel length. 

The frame is a late eighties / early 90s cinelli steel frame.

Some BB shells also have different design for the casing which means there is more space between the side of the shell and the crank.  Are there any hard and fast rules for BB choice?
In general, BB lengths follow the specification of the crank. Thus if you have a look at this site, it will state the BB length for this particular crank
http://velobase.com/ViewComponent.aspx?ID=5d1f43ed-82ec-48d0-b6e2-65f92ecdfcbe

If your crank specifications are not available, then i'd start by measuring the current chainline as per Sheldon Brown (genuflect now)
http://sheldonbrown.com/chainline.html

Then measure your BB spindle length and adjust accordingly. 

Also a good start is to know what crank you are using. If its Shimano, its likely using British ISO type BB. If its an Italian or French branded crank.. and depending on its age etc.. it could be using more 'exotic' BBs

You can do a search for Sheldon Brown Bottom bracket for info on that.