Gatsby would stretch out his arms to the light, because it was the closest he was to Daisy herself. He was in love with Dasiy so anything that he could do to show her that he would do. Nick compares the green light to how America rising out of the ocean must have looked to early settlers of the new nation. The green light was showing Gatsby he was doing the right thing his attempts to get Daisy back through dishonest means. This making him feel bad as a person. However he doesnt know that Daisy is as dishonest and fake as he is. Gatsby got what he ask for it goes back to the saying "be careful for what you ask for, you just may get it."
Lastly it was a representation of Daisy's awaiting for Gatsby to return to her someday. And in the movie The Great Gatsby that I watched it flickered on and off, so that could symbolize Daisy and Tom's unstable relationships.