The technology in Star Trek has borrowed freely from the scientific world to provide storylines. Episodes are replete with references to tachyon beams, baryon sweeps, quantum fluctuations and event horizons. Many of the technologies created for the Star Trek universe were done so out of simple economic necessity—the transporter was created because the budget of the original series in the 1960s did not allow for expensive shots of spaceships landing on planets.
In most Star Trek series, subspace communications are a means to establish nearly instantaneous contact with people and places that are light-years away. The physics of Star Trek describe infinite speed (expressed as Warp 10) as an impossibility; as such, even subspace communications which putatively travel at speeds over Warp 9.9 may take hours or weeks to reach certain destinations. Since subspace signals do not degrade with the square of the distance as do other methods of communication utilizing conventional bands of the electromagnetic spectrum (i.e. radio waves), signals sent from a great distance can be expected to reach their destination at a predictable time and with little relative degradation (barring any random subspace interference or spatial anomalies).
Sub Space communications have a limit of just over 20 light years before they need to be boosted, although this limitation has been "written around" for several story lines.