There are a large variety of variables that can result in misaligned sights on an AR, making diagnosis and detection a difficult process.
Please note: These pictures are do not represent defective or misaligned product, they are just meant to be helpful illustrations of the specific parts of the rifle.
Manufacturing Issues
The front sights are mounted working off aligning the index pin that is installed into the barrel extension. This index pin will represent the Top Dead Center (TDC). The center threaded bore of the front sight base (where the front sight post is installed), is lined up with the index pin to properly install the front sight base. Provided the bore is perfectly straight and the threads for the barrel extension are perfectly square, you will have a perfectly lined up barrel assembly.
Here is where it can get messy:
Looking at a upper receiver, if the index slot for the index pin is not machined perfectly on the center to hold the index pin at center, your front sight will be canted to one side.
For a flat top upper receiver, if the 1913-Pic rails that will hold your iron sight (at the position your iron sight is mounted) are not lined up parallel to a perfectly aligned index slot your front and rear sight alignment can appear canted.
Because rail mounted iron sights actually index off the right side of the flat top 1913-Pic rail, if that side of the rail is machined to thick or thin or the geometry is off, that will result in misalignment of the sights.
If the hole drilled to hold the rear sight aperture assembly (on a A2 or various BUISs) is not drilled on perfect center, that will result in misalignment of the sights.
If the hole in the rear sight aperture itself is not machined on perfect center, that will result in misalignment of sights.
Install Issues
Then another issue to consider is the installation.
If there is some movement between the index pin and the slot in the upper receiver, the torque of tightening a barrel can turn the barrel clockwise thus turning your front sight base.
So there are really a lot of variables to look at. Some will affect the sights more than others and some are easier to identify and isolate.
Ok, with a set of assumptions could the Mil-Spec information be extrapolated to give us a guide line for the allowable adjustment that is “with-in spec” ?
For the 20” M16 (Rifle length gas and sight radius), using M16A2 – MIL-R63997B
Assuming a 2” group
Assuming 1 click = ½ MOA
You get the initial +/- 5 clicks
Plus the 9.6 clicks to adjust a shot that is on the width of the target (as defined in D from the table -11.6”W), left or right to adjust the POI to POA.
That would leave you with approximately 14.6 clicks of adjustment for zero
For the M4 (Carbine length gas and sight radius), using M4A1 – MIL-C-71186
Assuming a 2” group
Assuming 1 click = .68 MOA
You get the initial +/- 12 clicks
Plus the 10.3 clicks to adjust a shot that is on the width of the target (as defined in D from the table -14”W), left or right to adjust the POI to POA.
That would leave you with approximately 22.3 clicks of adjustment for zero
Edited to add: I think the M4 is 1 click for .68 MOA so I recalculated.