In Dungeons and Dragons 5th edition, when my character successfully hits a monster in combat, does the GM have to tell me whether the attack deals the usual amount of damage or not? If the monster has vulnerability, resistance or immunity to the type of damage I am dealing, is the GM obligated to tell me?
The DM is obliged to tell you
This obligation arises from the How to Play section on p.6 of the PHB, that is, the most fundamental rule in the book:
3. The DM narrates the results of the adventurers’ actions.
The player has scored a hit for a known amount of damage (from the dice they rolled and their modifiers): "the results of the adventurers’ actions" is different if the monster has vulnerability, resistance or immunity to the damage than if they do not and the DM is obliged to communicate that difference to the player.
How that communication takes place is up to the individual table DM: some will straight out tell the player's that the monster is vulnerable/resistant/immune and others will describe the effects ("Your blow does more/less/no damage than you expected" smart players will twig pretty quick). However they do it, it is important that they do do it.
Why it is important is simple: the sole source of information about the world comes from the DM. The players need that information so that they can make informed decisions (like switching to a different damage type). This is not to say that the players should get information their character's don't know or can't perceive, however, following a successful attack the effects of the hit are neither.
GM is not obligated but should in my opinion provide ample opportunity for the players to gather that information. A creature that is vulnerable or immune to something will react differently and this should be reflected in the descriptions given by the GM.
Examples: A Vampire shying away from sunlight, or a Troll suddenly being more cautious against the fighter with the flaming sword, a Salamander wading unhindered through the Wall of Fire as though it was fresh air to it.
Passive Perception (or in some cases Insight) should pick up a bit of this in my opinion depending on distractions but sometimes I wait for a player to declare their character looks for these things and sometimes I don't even require a roll. Table mileage varies and I would not expect to notice things on the first hit or in the first round.
The GM is not "obligated" to do anything.
Ideally they would describe the hits as somehow dealing less damage than usual, or having no effect, to help properly reflect the game world to you. "Your arrows stick into the skeleton but don't appear to do much damage or impede it in any way." But unless you have an ability to actively detect the source of that issue, you don't know what it is - a spell? Resistance? You don't know, you'll have to reason based on the information you do have (try different weapons, etc.).
Depends on the situation
Yes and no. DM is obliged to tell what the character see. What does the character see obviously depends on the character and the situation itself (e.g. how unusual the enemy is).
Is the character capable of understanding the outcome of his attack? Then DM should tell. Is he an
optimized dumb Fighter with the Intelligence of 3? He
will continue to bash a werewolf with his great axe, being unable understand what damage immunity is.