Spider-Man is actually the most popular superhero ever. His toy sales are way more than Batman or Superman or the entire Avengers line-up.
so the top 3 would be:
But compared to Iron Man, Cap, Thor, etc. the Batman and Superman were more popular. However, that is mostly limited to the US, where the comic-book culture is much more widespread. They also had their own animated series that were very popular, giving them a big advantage.
You can see that popularity in the domestic opening of their movies. The first 3 Batman movies broke opening records, the opening of Man of Steel was more than Cap 2, Thor 2, or even Thor 3. But this is restricted to the US, overseas it's more about how much the audience likes the movies, and that is where DC is always behind, they don't have that type of foothold in the overseas markets, as Marvel makes more appealing movies.
And in time, that advantage in the US has also vanished, as the MCU has given big boosts to these characters.
I would still bet on the next Batman solo movie (releasing in 2021) taking a massive opening, on par with Black Panther.
Spider Man has always been the most popular superhero. Spider-Man took the first 100m opening, Spider-Man 2 didn't take the opening record due to release pattern, but still had record opening day, and Spider-Man 3 had the first 150m opening. Even the crappy Amazing Spider-Man 2 made more worldwide than Justice League. Now that the Spider-Man brand has recovered from crappy movies, it would be interesting to see how big Spider-Man: Far From Home opens.