Here's why:
* Protostars are very young and still accreting material: They are surrounded by a dense cloud of gas and dust that absorbs most of the visible light they emit.
* Infrared radiation can penetrate dust: Unlike visible light, infrared radiation can penetrate the dust surrounding the protostar and escape into space.
* Protostars are relatively cool: Compared to mature stars, protostars are still relatively cool, with surface temperatures ranging from a few hundred to a few thousand Kelvin. This leads to peak emission in the infrared portion of the electromagnetic spectrum.
As a protostar evolves and becomes hotter, its peak emission will shift towards shorter wavelengths, eventually into the visible light spectrum.