When you use a tanning bed for tanning your skin you must wear the goggles or glasses that the tanning place provides you with when using their tanning bed.
The UV rays from the tanning bed are very strong and dangerous UV rays and are actually more dangerous than the suns UV rays.
So even if you keep your eyes closed the UV rays can penetrate your eyelids and still harm your eyes and potentially cause blindness.
The glasses or goggles provided when tanning in a tanning bed will prevent damage to your eyes when in the tanning bed.
So you must wear the goggles when tanning because keeping your eyes closed is not enough to protect your eyes from damage.