Use the goblin's passive Perception score as the DC
By default, the rules for hiding (p. 177 PHB) state:
You can’t hide from a creature that can see you
In 5e, by default there is no facing in a combat situation (Facing is an optional rule in the DMG). That means by default, a creature in combat can see 360 degrees around them. So you never could sneak up to someone in plain sight in a combat situation, when they are alert and looking around.
But outside of combat, this should be possible. A guard may be mostly looking in one direction, bored by his dull task. Or you might be able to observe them, waiting until they look the other way to make your move. Or you may be hard to see because you are hidden in shadows, or behind soft cover.
The DMG says this on page 243 about Noticing Other Creatures outside:
Outdoor visibility can be hampered by terrain, weather, and time of day. Creatures can be more likely to hear one another before they see anything. If neither side is being stealthy, creatures automatically notice each other once they are within sight or hearing range ofone another. Otherwise, compare the Dexterity (Stealth) check results of the creatures in the group that is hiding with the passive Wisdom (Perception) scores of the other group, as explained in the Player's Handbook.
So if the player characters try to be stealthy, you would compare their Dexterity (Stealth) checks to the passive Wisdom (Perception) score of the goblin behind the arrow slit, which is given in their stat block: 9.
If the entire group is trying to sneak past, you can have them make a group check (p. 175 PHB):
To make a group ability check, everyone in the group makes the ability check. If at least half the group succeeds, the whole group succeeds.
Depending on the circumstances, you can also give the group's members advantage on their checks, or the guard disadavantage (-5 on a passive check, making their passive Perception score 4). Normally, I think an arrow slit would not do that -- it may limit the angle of view, but does not hinder how well you can see anything in the area you can observe, and if the PCs need to pass through that area, the limited angle of view is not much of a disadvantage.