At their most basic, tags are the devices used to show the reader who's speaking, and sometimes also how they're speaking and in what context. The most basic tags are he said, she said, said Ug the Barbarian etc*, but it gets a lot more complicated than that.
For one thing, there are vast quantities of verbs in the English language that mean a particular type of saying, and at one time it was common — certainly more common than now — to use these to the full. Characters would expostulate, opine, or even ejaculate their words.
Generally speaking, this has gone out of fashion. A term has even been coined for it: "said bookisms". In fact, in some quarters you may even be told never to use any verb but said, but that seems to me to be a rule followed off the edge of a cliff.
The argument is that using colourful verbs in tags distracts the reader from what's actually being said, and the manner of speech should be clear from the context. There's certainly a lot in that, but there are other verbs that give a quiet, matter-of-fact account of the speaking, just hinting that the speech isn't entirely neutral — asked, replied, murmured, shouted etc. Each of these can be used without getting in the way of the dialogue itself.
But what about the more elaborate words? Well, it partly depends on the tone you're shooting for. In general, "said bookisms" work better in comic writing (Douglas Adams is an excellent example) but even a more serious writer might want to cultivate an exuberant style that would suit this approach.
As with anything in writing, though, it's important to know exactly what you're doing and why. If you don't have any particular axe to grind, my recommendation is to start with said as your default (perhaps with asked and replied as fairly obvious in their places) and identify the specific places where a more elaborate verb would work. "You'll never get through this gate," thundered Ug has a genuine purpose — said just wouldn't cut it there.
One particularly controversial group of words are those that don’t represent believable speech. I can just about accept laughed or wailed if the person is laughing or wailing a very short phrase. "Stop that," laughed Ug is believable as a phrase caught up in an explosion of barbarian laughter. "That's absolutely the funniest thing I've ever heard in my life," laughed Ug isn't — and not only because no self-respecting barbarian would use the word absolutely.
On the other hand, there are words that don't in any way represent speech — unless you're writing about a species whose language is based on facial expressions — like smiled or winked. I'd definitely advise against these. Instead of "I'm pleased to meet you," he smiled, what's wrong with "I'm pleased to meet you," he said, smiling? Far more accurate.
The other big controversy is the use of adverbs in dialogue tags. Now adverbs tend to have a bad press that's largely unfair, but it's undeniable that a big part of this is because of their overuse in tags. That's not because they're adverbs, though: it's because their use is often a symptom of lazy writing.
Sometimes the problem is that the adverb is vague and could be expressed in a much clearer way. "Stop doing that," she said angrily isn't wrong, but it's not very evocative and "verb adverb" in tags can easily become a very repetitive pattern. Much better would be "Stop doing that," she snapped, scowling. A specific case where I would reach for a slightly more elaborate verb.
Equally, the adverb may be redundant — in tags like she whispered quietly, he asked questioningly, she snapped angrily, the adverb merely repeats what the verb has already told us.
Adverbs aren't always wrong, though. Sometimes an adverb is all that needs to be said. "Is that really true?" she asked quietly is both clear and evocative.
So should we just tag dialogue with an endless string of he said, she said? Not at all. There are plenty of other ways of tagging dialogue, including not tagging it at all. In an ongoing back-and-forth, especially between just two characters, it's obvious enough who's saying what, and it can be given without any tagging at all. As long as you keep track. I've read at least one published book where the author appeared to have lost count in a scene like that.
Or you can use an action tag, instead of a dialogue tag. An alternative to the sentence above, "Stop doing that," she snapped, scowling, might be She scowled. "Stop doing that."
The best approach, perhaps, is to understand the full range of options and use whichever is the right one for the moment, as well as for the bigger picture. Vary the type of dialogue tags, action tags or no tag you use from paragraph to paragraph, and also use tags and interruptions to help the dynamics of the speech**.
Or develop you own non-standard, utterly idiosyncratic approach to dialogue tagging. But, if you're doing that, make sure you do it very, very well indeed.
* When using a pronoun, it has to be she said, unless you're trying to sound archaic with said she. If it's a name or other noun, both said Ug and Ug said are equally correct — it's entirely a matter of taste and how the sentence flows best. If someone tries to tell you (as they occasionally do) that one or the other is wrong, they're talking through an orifice other than their mouth.
** One mistake beginners often make is always to put the tag at the end, even of a very long paragraph. This can confuse readers, if they need to identify who's speaking; it's redundant, since by that point the speaker and the way of speaking should have been established; and it makes the flow of the writing clunky. In general, tags should come early and, if possible, punctuate the dialogue.