Lots of experience with bikes helps you develop an eye for it. One thing you can notice is the space between the top tube and down tube on the head tube. With traditional geometry (horizontal top tube) this dimension helps you get a pretty close guess at the frame’s size. It gets trickier with endurance frames that have a sloping top tube. If you know the approximate wheel size, this too can help with approximating the frame size just by looking at a picture.