"It is written" is a (often religious) concept that everything/most things are pre-determined and already written in the book of fates.
It teaches people humility in face of failure and takes the blame from the individual and places them in the context of a greater plan.
It also teaches humility in face of success, because it is not part of what the individual did, but instead the individual simply moved along the lines of the pre-determined path.
Finally, it gives hope to individuals, because no matter how dire the circumstances, there is a plan and the plan should benefit everyone eventually (why else would someone write it down?).
Jamal faces a lot of misfortune in his life. Orphaned, living in poverty, losing contact with his few friends, mistreated by many including the talk show host.
But he also has some glimpses of hope and tranquility, a good deal of which include Latika.
This seems inconsistent and unfair. Why would he have so much unfortune while also being tortured with an unreachable carrot on a stick? Why does he not succeed in his attempts to reach a better stage in life?
One possible answer is, because it is simply the path that he is meant to follow.
In many ways it is the antithesis of the "american way". Of working hard and earning your higher place in society. Of getting from rags to riches.
Jamal does not seem to get out of the rags, no matter what he tries or how much he presses his luck.
And one artefact of the the rags-to-riches culture is the WWTBAM-concept. You can become a millionaire with just a few minutes of answering questions correctly. Either by knowledge or by chance.
Jamal takes that hurdle eventually. Now some might argue that it is proof that you can always make it, you just need to take your chances. But the final answer is: humility. Enjoy the good moments, it will be fine in the end.