PIC16F877A PORTA RA4 not working as ouput
RA4 on that microcontroller is an open drain output. This means that when you set it as low, the output will be low; but when you set it high the output will be tristated (high impedance). 

You will need to change your LED configuration to turn it on with an open drain.