How to wire a light with two sets of wires
Based on your description and the picture (thank you) the red wire is the hot switched loop to control your light. Connect your black wire from the light to the red wire in the box, the white to the white and the green from the light to the bare ground I see lurking in the back of the box.
You should be good to go.