Worms do not have eyes. They have organs that help them feel vibrations in the ground and intensity of light. So, they can "see", they just don't see as you and I see. Their "front end" is actually called the anterior, and is very sensitive to things like movement and light.
Fun/Terrifying fact: if exposed to light for more than hour, most earthworms will become paralyzed.
(Edit) As for what they eat...well, there are almost 3000 different types of worms in the world (I think) and they live anywhere there is appropriate oxygen and food. So their diets are diverse. Some worms just eat dirt (literally), while others may eat microorganisms from leaves and plants.