Sounds like the ambient light sensor is not sitting correctly or is damaged. If the ambient light sensor isnt properly positioned it could be fooled into thinking that it is dark out and that there is no need for the screen brightness to be turned all the way up.
Alot of the iphone 5 assembles will not come with the mounting hardware for the camera and ambient light/Prox sensor already attached. To be sure its not the light sensor you need to make sure these pieces are already installed on your screen. If they are not and you need to know what your looking for..... These mounting pieces are 2 small separate hazy/clear plastic pieces that line up the camera with the clear opening at the top and 2, less noticeable, opaque holes about 1/4th of an inch to the right and a few millimeters down. (hold the screen up to the light while looking at it from the back side and youll see them). They can be transferred over from the old screen by gently prying them free ( Be careful! they will pop off and fly several feet if your not holding them down) and placing them back in the correct position with new adhesive. If you use super glue be especially sparing! Just a fraction of a drop is enough to hold these, any more and it may spill over onto the openings and corrupt the view of your camera or the light sensor.
Reassemble your screen once the hardware is secure, while doing this, make sure the proximity/ambient light sensor is positioned squarely inside its mount and that it does not wiggle around.
Hope this helps :)