The .netrc file can contain username and password credentials for various sites, to allow simpler invocation of tools. For example curl with the -n option will read credentials from the file, for the given target site. Or FTP does similar.
Also custom written command-line tools and scripts can be designed to read credentials from the same file.
Assuming the file itself has 0400 permissions, Is this generally considered to be safe? different people seem to have different opinions.