Well, other than the bridge rectifier problem that audioguru pointed out, the schematic looks OK to me. But still doesn't show HOW it's built.
A schematic assumes that all connections, particularly the multiple power and ground busses, are made with near zero resistance/impedance interconnects.
From your description of the circuit behavior, I suspect that isn't true in your implementation of the schematic. Are you by chance using a solderless breadboard?
You said that when you energize the relay, that the pic16f877a resets. I think that the current that the relay requires may be pulling the 5 Volt rail down below the point at which the f877 resets.
To prove this theory, try separating the power to the f877 from the relay as dknguyen suggested in post #15 above. Either a separate 5V source, or diode isolating the two. At the very least, make sure the relay has it's own 5V connection to C7.
Additionally, as alec_t said in post 10, check your grounding scheme. The microcontroller circuitry can share a common ground connection to C7. But the emitter of Q1 must have it's own path to C7.