Weather data - such as temperature and humidity measurements, rainfall amounts, and atmospheric pressure - are collected in many ways. On land, weather stations outfitted with instruments collect measurements around the clock. Weather balloons carry instrument packages up through the atmosphere and dropsondes carry instruments down through the atmosphere. Data collected by the instruments is transmitted via radio signal back to the ground. For more information, check out the NOAA article Six Tools Our Meteorologists Use to Forecast Weather.
Over the ocean, satellites are an important source of weather data. Most of the weather data we have for areas that are not on land is from satellites. There are a variety of weather satellites and sensors that collect information about weather from afar. Some document cloud cover and air movement. Others deduce air temperature, pressure, or the amount of water vapor in air. Satellite data can be used to understand variations in the atmosphere with altitude at one location, or geographic variations in the atmosphere.
In recent decades, as the amount of satellite weather data has increased, the quality of weather reporting, warnings, and forecasts has increased as well. Weather data are added to weather models to make forecasts more accurate to help people prepare for weather events. This has led to more accurate weather forecasting. Five-day forecasts today are as accurate as three-day forecasts a decade ago, in large part due to higher quality weather data from satellites. For more information about how and why weather forecasts are becoming more accurate, see the NOAA article Building a Weather Ready Nation.