Opener eyes greatly improve the safety of your garage door. The eyes send a beam across the garage door gap about 8" off the ground to see if your dog Buddy, the neighbor's cat, or your child is in the path of the door. If anything or anybody breaks this beam as the door closes, the garage door will open back up.
Many people think that the eyes on their garage door are broken, when they are only misaligned. Kids riding in and out of the garage on their bicycles or kicking soccer balls around the yard are bound to bump the eyes. This can cause one of the eyes to point slightly the wrong direction, keeping the door from closing unless you hold down the button on your remote or wall station.
Over time, the eyes also build up dust and dirt. As it collects, it restricts the beam and the eyes register that something is under the door. You may just need to clean your eyes or realign them to fix your garage door.
Note that you can find eyes that work with most opener manufacturers in the miscellaneous link below.