Lighting a candle is symbolic of offering up prayer and/or a specific intention.
The candle represents Christ. In older churches (and still in some places), the candles were/are made from pure beeswax. This represents the purity of Christ. The flame represents that Christ is the Light of the world.
In lighting a candle, we are offering up our prayers, uniting them with the whole Body of Christ, and therefore to Christ Himself. All this we do in the power of the Holy Spirit, who enables us to prayer with greater devotion, and prays what we cannot/know not how to pray.
In the power of the Holy Spirit, united to Christ, our prayers are offered to the Father of all Lights, our beloved God and Abba. And He hears our prayers- not only because He knows all, but because we are His beloved children.
As such, lighting the candle also holds Trinitarian symbolism as well.
Finally, it is not only an act of piety, but also traditionally one of charity. Many parishes have an offering box, where you can put some money. Some of this goes to pay for the cost of the candles, but also much of it goes to various charities, the upkeep of the parish, etc. etc.