There are really two questions here. If God knows our needs, why do we need to pray? And if we pray, why do we need to write up and burn petitions?
The answer to the first question is biblical and theological. In the Gospel, numerous times Jesus asked us to pray, and to pray even persistently. We see that in the teaching “Ask and you will receive, seek and you will find, knock and the door will be opened to you… If you who are evil know to give good things to your son, how much more would the Father give you the Holy Spirit if you ask for it?” As for praying persistently, we see that in the parables of the widow and the unjust judge and the friend asking for help late at night. And we know Jesus often prayed for a long period of time: during the 40 day fast, after His first ministry at Capernaum, before He chose His apostles, before His arrest, etc.
So, even though God already knows our needs, Jesus asked us to pray, and keep praying fervently. Why? Because we need to know if we really want His help, and that we really believe He can help us. God has reserved certain graces that He would only give us when we have demonstrated our desire, so that our faith may in the process be enlarged.
Writing down and burning our petitions is not a universal practice of our faith. However, it is a tool often used at some occasions to accentuate our desire for God. It is like an act of commitment that I declare my trust in God for this matter, so I write it down to make it definitive. It is also to have something physical and public so that I can offer it as a tangible object.
As to burning it, that is based on the Old Testament burnt offering and the burning of incense in Revelation, which represents our prayers. It is also a good way to protect people’s privacy.