What purpose does the yellow and green LEDs have on the Arduino?
The green LED is marked with ON, and it indicates that the Arduino has power.

The yellow LED is marked L and is just connected to pin 13. So when you set pin 13 to HIGH the LED lights up. You can however still use pin 13 for other things.

When the green LED stops shining you most likely have a short somewhere. As the short will drain all power away, so the Arduino has no power left to light the LED(s).