How long an LED will last depends on several factors. Let's assume that the moonlight or
DIY LED light you have is using a fairly bright LED of around 4000 to 5000 mcd, which is typical of a bright LED. Those LEDS are typically rated at 100,000 hours of continuous use under rated conditions. That would be more than 11 years if you left them on 24/7. This is assuming that the LED is powered at it's rated forward voltage and current. If your LEDS are operating at slightly less than the rated voltage or current, you can expect the longevity to increase.
To say that the LED will last longer if you leave it on, rather than cycling the power on and off, is really a stretch. An LED in a flasher circuit can last many times longer than its rated lifecycle due to the fact that it is only lit for a small amount of time. In fact, some circuits that utilize high-powered LEDS to produce an intense amount of light will often flash the LED on and off many times per second. The result is that the LED flashes at a rate such that the "on" time is greater than the "off" time, so the human eye doesnt notice that the LED is actually off. The Duty cycle is such that the LED is actually off for a measurable amount of time in a given time frame which increases the longevity of the LED itself. Also, an LED generally has a greater "peak" forward current than its continuous rated current. When the LED is "pulsed" on and off rapidly, the circuit can be designed to operate near this peak current rating where the LED will produce even greater intensity. LEDs really are very robust devices and not as sensitive as you may be led to believe.
If you build the LED light yourself and design the circuit around the LED that you are using, the LEDs themselves should last many many years. If you operate the LEDs at voltages greater than their rated forward voltage or exceed their maximum continuous forward current ratings, then the life of the LED will be shortened. I wouldnt worry about turning them off and on again. The lifecycle of an LED, even under slightly adverse conditions, should far exceed that of an ordinary light bulb or flourescent tube; which would probably be replaced ten-fold before you needed to replace a one dollar LED. If your thinking about building your own LED lighting, dont be afraid to ask for some advice and get the most out of your money.