Tommy decides to become the captain and order Jack to walk the plank because he is frightened of walking the plank himself. He is also clearly tired of taking orders from Jack , as evidence by his response to Jacks order to hand over the cookies. Tommy must have been taking Jacks orders for a while , since Jack is always captain. this may suggest that Tommy ordered Jack to walk the plank as revenge for his earlier unfairness
The lights in the sky are the souls of all the animals and humans that have passed away. They are dancing in the moonlight. It's there to remind you that they are in a better place.