Absolutely, affiliate marketing is halal because it’s a simple business model entirely permissible in Islam. Because affiliate marketing is legit, so you have nothing to worry about if you follow Islam.
As long as you are not using borderline marketing strategies (haram affiliate marketing) and want to add value to your audience, you can make money with affiliate marketing.
In short, every business model always has halal and haram sides. Whether it’s marketing, online or physical, every business opportunity has these sides.