When a candle burns, energy is released in the form of light and heat.
Candles are used to provide light because when they burn, the energy which is released takes the form of light. Similarly, because fire is involved in the process, heat is given off as well.