Goblins gather in great numbers under the tyranny of an Orc leader, or in widely-varying tribes of their own. Regardless of whether a Goblin is a lackey under the heel of a domineering Orc or the member of a distinct tribe, they make for lacklustre troops. However, Goblins can defeat an enemy through sheer weight of numbers, especially if they can attack from a flank or even better from behind. Goblins prefer to attack defenceless foes and shooting arrows from a distance is likewise a popular type of attack among their kind.
Looking at their stats might make you think they are inferior to Da Boyz. However, with 33% more members per unit, smaller size and better shields, they are much more survivable. Think of them like offensive linemen in American Football. They don't do a lot of damage but take a long time to kill. They jam up the enemy for stronger orc units to flank and allowing your Heroes to dictate the battle. Even the best end game infantry units will still take awhile to kill enough gobbos to break them. Ranged weapons from the front hardly phase these guys and when spread in a thin line artillery barely scratches them. Their weaknesses are cavalry charges, units with fear or terror, and AoE magic. Their strength versus ranged and artillery make them a solid core of your army all the way up to end game. The extra low leadership on night goblins means you should never fully replace them.
The goblins are a big factor in variety: expendable, and high numbers in the early game. Since they count as the spear unit and have big numbers, their job is to help and make sure the orcs are not outnumbered and take care of roles that the orcs can't do as well - whether that is countering the CAV, flanking, or chasing down ranged units (beside gits on horses with bows and arrows of course).
Remember that goblins have bad leadership, so before you put goblins to use, take their bad leadership as a risk of failure into consideration. Make sure your gobbos are not put into a situation where they break shortly after the melee has begun - i.e. taking a cavalry charge when not having the lord nearby.