Narrowband filters in astrophotography are used to isolate specific emission lines emitted by nebulae, such as hydrogen-alpha and oxygen-III. By blocking other wavelengths of light, narrowband filters allow photographers to capture detailed images of nebulae against a dark background, even in light-polluted areas where broadband filters would be less effective.