It will never be a perfect match, due to the change on the nature of the light sources themselves. (Daylight coming from the Sun is a point light - from a window is a directional soft light - nighttime photos will tipically have multiple, point light sources + wall reflection and so on) - you can't compensate for these changes in the raster image.
But for adjusting overal tone and shadow curve, you might want to use the "curves" tool. Switch GIMP to multiple window mode (uncheck Windows->Single Window Mode
, have each of your images open in a window and place them side by side, and then use curves (Color->Curves
) on the image you want to change. Fiddle with the curve until you are happy. You might want to change the channel to "red" while at it to compensate for the color casts in artificial lightning (although the camera does much of that already).