There are a few reasons molecular hydrogen (H2) is hard to detect depending on what band you are looking.
In the UV, it can be detected in absorption of the electronically excited Lyman–Werner bands, but these bands are not observable from the ground on Earth due to the atmosphere absorbing all the UV. Even so, the Far Ultraviolet Spectroscopic Explorer (FUSE) routinely observed H2 in the UV. You need a bright background source such as an O or B star, or perhaps an AGN, to observe these bands in absorption which limits your potential targets. Most of the H2 floating around out there in the interstellar medium doesn't have a bright UV source behind it.
Molecular hydrogen is a homonuclear diatomic molecule that lacks a dipole electric moment. It does have many molecular rotational-vibrational transitions in the IR, but these are electric quadrupole transitions which have low transition probabilities. That means you need a lot of H2 to observe these transitions in absorption or emission. Compounding the difficulty in observing these transitions, most H2 is cold and lies in the lowest pure rotational states, so you will almost never see the higher energy transitions. The low energy pure rotational transitions in the mid-IR are also notoriously difficult to observe from the ground, due to absorption from the Earth's atmosphere. Only in warm gas such as shocks where the molecules can be collisionally excited, or near a UV source such as O & B stars in a star forming region or the central star in a planetary nebula where H2 can be pumped by UV absorption into higher vibrational and rotational states, will there be enough excited molecules to see these transitions in emission.
In conclusion, it is difficult to detect due to a combination of the physics of the molecule itself, and the atmosphere blocking most of the UV and IR bands it absorbs/emits in.