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.
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 both sensor lights are not on, the door opener will not close and the light will blink because the opener thinks there is something in the door path. This is a safety measure. One light being off is usually due to either the two sensors getting out of alignment, a faulty connection, or a faulty sensor. You say that you have installed new door sensors. If both lights are still not on, you have to troubleshoot that first. Check all connections and then try to align the 2 sensors. If both green lights are on, and the opener will still not open, then the fault is probably elsewhere.