Is it a good idea to have an Infrared scan and/or air quality test done during a home inspection?
I am a certified home inspector, so I am a little reluctant to answer this question. I will, however spill a few thoughts. In recent years, the tests you refer to have become fairly popular, but normally in houses that show some signs of water or mold. I personally would only recommend an infrared scan if there was suspicious water spots or paint peeling on walls or ceilings where pipes would be located. The other reason for an infrared scan would be for an energy audit. Every house is going to show some areas where there is some excessive heat loss, but that is the norm, not the exception. nothing to get alarmed about. Since infrared looks at temperature differences, only active leaks or saturated insulation will show up in a scan.  If there is no evidence of a leak, I normally would not recommend one.

Air tests that look for allergens are actually looking for airborne mold spores. Every test I have done returns with some degree of mold spores. Most are naturally occuring outdoors rather than in the house itself. Most are classified as slight or moderate irritants to people who are sensitive to them. Again, unless I see actual signs of mold on walls, in the bathroom or in the attic, I don't recommend an air test. I do however recommend a "tape" test on actual mold samples. If the results come back as a bad type of mold, then I will encourage an air test and possible remediation.

I am always a buyer's advocate and tend to ere on the side of caution. Any house, regardless of age can have problems created from a leak or poor construction standards. In the huge majority of homes, this type of test is a feel good thing, rather than a necessity. A good inspector will see the signs. If they push the tests without cause, then they are padding the bill.  Just my humble opinion.  Good luck...