You probably only have to shield the sensor just enough to put a shadow over it (and not let the sun hit it directly). I would think a small piece of cardboard taped to the side or top (or both) of the sensor that is getting hit with the sun should do it.
Another way would be to block the sun from outside of the garage by maybe planting a shrub (test it out by putting your garbage can in line to block the sun when it is low in the sky and see if it works).
There are several things that could cause a door opener to not work properly. Tester101 put most of them in his comment, but most of those would at least result in the opener visibly and audibly trying to open the door, and then giving up.
This may sound counterintuitive but my first priority would be getting the light working. Most garage door openers use the light as the primary indicator of a problem, by blinking it a certain number of times. Replace all bulbs in the unit (preferably with bulbs designed for use in high-vibration applications) and see if the light will turn on.
The second thing to do is verify that whatever control you are using to try to open the door is properly connected and/or programmed. Replace any batteries, check the inputs on any hard-wired switch or panel, and have the opener "re-learn" any wireless control modules you're using. Understand that many systems require at least one hard-wired multi-function switch in order to access all the features of the opener.
Also check all the safety interlocks. Most openers on the market will not operate at all without the electronic eye system properly installed, connected, aligned and the lenses cleaned. Certain systems may have eyes at multiple levels to allow the eye to "see" things that could cross the threshold at different levels, like a car bumper vs a truck bumper; every installed eye system, and there must be at least one, must be working properly.
Next, pull the red handle on the traveller shuttle to disconnect the door from the drive mechanism. Press the garage door button, and see if the chain drive operates. If so, the problem is the door; it's locked, jammed or improperly counterbalanced. If it still doesn't move, the problem is the drive mechanism; either the travel settings are messed up, such that the door thinks it's fully up or down no matter what position it's really in, or else the motor has burned out, seized up, slipped a gear, etc. Try adjusting the travel and see if the drive will move. Also, some openers are pressure-sensitive and will abort closing if they sense that the door is pressing on something (like a kid who tried to slip through and got caught); that pressure sensitivity is often adjustable, and you may have it set to be too sensitive so it's tripping based on the weight of the door itself.
If none of these at least indicates a further course of action, you're probably looking at replacing the door opener.
Best Answer
if sunlight on the sensor isn't causing the issue, then the problem is either bad opener, bad wiring or a bad sensor.
when the sensors are not working, use a multimeter to test the voltage put out by the opener. if that's not right, then you might have a bad opener.
next i would try disconnecting all of the wires at both ends, cutting off the exposed conductor and stripping the wires fresh, then reconnecting. make sure to thoroughly clean any corroded terminals.
if neither of those are the issue, then you need to decide which is easier for you: replacing the sensors or replacing the wiring. do one of those, and if that doesn't fix it then do the other.