Because many objects in space don't radiate any optical (visible) radiation at all. And other objects, like stars, radiate a lot of invisible radiation in addition to the visible light from them. So the ability to detect and measure invisible radiation makes it possible to learn a lot more about objects in space than we could if we could only use their visible light.