A simple approach would be to have a grid of black tiles drawn on the top layer. As the player enters each tile, the "dark tile" is removed. It would be fairly quick to implement, but you wouldn't get a continuous illumination this way.
I'm not sure how frequently you can update an image with the image API. One way I can think of to use it would be to have an invisible, black circle that is the player's "light" following them around. Begin the scene with a black image "shadow" drawn over the top layer. Periodically, use the "clear image using <>" block with the black circle to mask out part of the shadow.