How can we confirm or have a clear idea whether hydrogen bonding is taking place in substituents of cyclic compounds? For example, it takes place in ortho-nitrophenol, but it doesn't take place in ortho-flurophenol despite the fact that the nitro group and the fluorine are present at the same position and both are highly electronegative.
From a structure diagram alone it is hard to determine these interactions. The reason for this is that important structural parameters are stretched or shortened in order to flatten the molecule for a 2D drawing.
In a first order approximation a molecular modelling kit based on balls and sticks could already be very helpful. It'll let you approximate the 3D structure and get a 'feeling' (also known as chemical intuition) about where to expect close contacts, or what bonds are strained, etc.; just to play around with it will give you a better visualisation of the shapes of molecules in general.
More advanced is using computers. While this might seem intimidating at first, it is actually something you can do at home. I've previously written extensively about how to do these identifications in this Q&A: How to identify hydrogen bonds and other non-covalent interactions from structure considerations? There are quite a few programs out there that let you build ball and stick models of compounds using tabulated bond lengths. That is probably already enough to identify likely positions for these interactions. Many of these molecular editor programs can run optimisations on a quick but low level, too. My personal favourite is Molden (very lightweight), but Avogadro does the job equally well, and probably has a nicer user interface. (Geoff, if you read this, we are all still hoping for a major update.)
Obviously you can increase the level at which you are running the calculations; for more complex structures you may need to. A lot of this can still be done with a home computer. You can start out with semi-empirical models, of which I recommend the fantastic open-source xtb, go on to ab-initio wave function methods (esp. HF), climb Jacob's ladder (AIP Conference Proceedings 2001, or see these slides by Perdew via helper.ipam.ucla.edu), and finally make your way to the various post-HF methods. (the last one you probably don't want to do on a laptop computer.) In this context I would like to point you towards Orca.
For the two molecules you mentioned, I've done the analysis with xtb and Multiwfn.
With these two molecules it is still quite simple, because they are flat (mostly at least; they are of course not static). Here is a model of the 3D structures with the hydrogen bond measured. For ortho-fluorophenol it is 2.25 Å and for ortho-nitrophenol it is 1.73 Å. You can see a clear difference already.
And here are the non-covalent interactions from Multiwfn analysis (Option
2, visualised with ChemCraft at contour value 0.2 and in range ±0.05):
The red coloured blobs correspond to repulsive interactions, while the green and blue coloured values correspond to attractive interactions. As you can see, there is no hydrogen bonding in ortho-fluorophenol, but there is some in o-nitrophenol.