1) Starting/stopping things causes damage. That is why lightbulbs only last for about 1000 uses. Each time electricity runs through it, the temperature changes, creating stress and microscopic fractures, eventually the bulb breaks. That is why your mother probably told you not to flash it on/off like many kids love to do.
2) Constantly running electricity through an item will wear it out (that is why lightbulbs are only rated for about 1000 hours of use). After that time, the lightbulb will just blow from the constant wear of electricity. Also, constantly running motors (drives, fans, etc) wears down parts due to friction.
So turning on/off a computer rapidly is bad, and running it nonstop is bad. In old studies done (late 1980s), an optimum was found at around 1 hour. If you leave the computer for less than one hour keep it on - for more than one hour turn it off. That way the minimum failures was achieved. Have parts changed, yes, but I guarantee there is still an optimum probably near one hour that will minimize failures.
As a more recent example in my department there were two computer labs of identical computers with identical software and the students had access to both. One lab was open 24 hours a day and computers were left on. The other lab was only open 8 am to 5 pm. The one that shut down at night had far fewer (roughly 50% less) bad monitors and bad drives (hard drives, CD drives, and floppy drives). There wasn't enough info to compare other part failures (CPUs, motherboards, etc) since these failures occured much less often.