The idiom has been around for over three centuries. When we wish to measure the length or width of an object and we don’t have a tape or ruler at hand, we sometimes make use of our thumb to do it. This way of calculating the length/breadth of something, will not give us the exact measurement, only an approximate one. So when you say that you are doing something by rule of thumb, you mean that what you are doing is based on experience or instinct, and not on exact calculation.
*A good rule of thumb is to make three chapathis per guest.