Once she joins S.H.I.E.L.D. Black Widow is used more as a codename than anything else, similar to Hawkeye for Clint. We see this in this image of a screen with S.H.I.E.L.D. mission details.

However, the name was originally earned by her for becoming a top level spy and assassin. There's some hints to this in the films such as at the beginning of The Avengers when she is "captured" by Luchkov.
Luchkov: Solohob? Your reputation is quite a progression. The famous Black Widow. Nothing but a pretty face.
The Avengers
It is further spelled out in Marvel's The Avengers: Black Widow Strikes Issue 1 where a Russian spy named "Sophia" wants to kill Nat and take over the title.
Natasha: And... what do you get out of this if you "win"?
Sophia: Oh, I'm sorry, didn't I mention? If I win, I take over the mantle of Black Widow.
Marvel's The Avengers: Black Widow Strikes Issue 1
Lastly, Black Widow is still her codename and sort of a nickname, that is why the Avengers and her friends will sometimes call her by that name. However, they're more personal than that so most of the time they use Nat or Natasha.
Presumably we'll get even more information on this in the upcoming Black Widow film. However, we do get a bit of information in Black Widow Prelude Issue 1 where Thaddeus Ross gives us a rundown of what he knows about Natasha. As part of this he tells us the following:
Thaddeus Ross: Natasha Romanoff, A.K.A. Black Widow. Born in Russia, 1984.
[...]
Thaddeus Ross: At some point, she attracted the attention of one General Dreykov. He oversaw something called the Red Room, which was managed for him by someone known only as Madame B.
Hawley: The Red Room? I thought that was a story. Made up for some best-sellers or something.
Thaddeus Ross: On no, it was real, although it doesn't exist anymore. And Natasha was apparently their star pupil.
Black Widow Prelude Issue 1
This is interesting in that it tells us she was the star pupil etc. but also the line by Hawley "The Red Room? I thought that was a story. Made up for some best-sellers or something." This indicates there are stories out there about the Black Widow, presumably for The Avengers PR, but it means Bruce calling her Widow was also likely a joke about that too.