The safest way to earn money is by upgrading your settlement, that will earn you caps. That way you ensure a regular income.

Successful attacks on zombies will always earn you a good amount of caps.

Trade businesses in the marked (cap symbol) areas on the map ensure you additional income.

To make a quick buck, attack other players in PvP mode via the button in the lower right corner next to the map and win the fight.