The premier free USA forecast source is from weather.gov (the NWS site). There are (as Wim cited) two versions of my advforecast2.php script that use this data. The V4 script is a 'page scraper' from the point-printable forecast produced by a MapClick.php URL -- this is the current 'production' version of the NWS website and is the best maintained, most reliable.
For a couple of years now, a 'replacement' for
www.weather.gov has been in development/testing at
https://forecast-v3.weather.gov/ and it relies on data provided via
https://api.weather.gov/ -- my advforecast2.php V5 script uses this JSON API and relies on the lat/long to find the forecast. The API is WAY more atomic than one would expect -- it requires multiple API accesses to gather the data for a forecast, but since much of the extra accesses can be safely cached (data doesn't change), it only resulted in some additional coding the gather/cache when a new forecast point is accessed. The basic issue with api.weather.gov is it is still in BETA and so support and reliability are both lacking -- NWS local offices are sometimes lax in loading the point forecast data from the models into the api.weather.gov services, so sometime only a zone forecast is available for extended periods. The production cutover is long overdue, and no word has been issued by the NWS on production timing for api.weather.gov.
The SOAP access to NWS data has been problematic for years, and I think they'll deprecate it in the future when the api.weather.gov is made productional.
Both of the above scripts only work for USA locations. For worldwide locations,
https://darksky.net/ has forecasts derived from various country models and provides a free, low-volume API key for developers (and hobbyists) - My DS-forecast.php script uses their data.
One thing to note is that they only provide icons for Daytime weather but they have multilingual capability.
WeatherUnderground has deprecated their old API for a new weather.com (TWC) API that is free only to WU members who submit PWS data to them. All others have to pay $$$ -- I have a WC-forecast.php script that handles their API. It too is multilingual but only offers 5 days of forecasts (but both Day and Night icons).