My attempt to answer your questions:
1. Can I use this MCU with Explorer 8 board?
You should be able to use PIC18F2525 with Explorer 8 board. That particular MCU is not listed in the Explorer 8 supported devices page, but with a quick look in the board schematic I can see that the 28-pin socket (J13) has the power supply, programming and oscillator pins matching those of that MCU.
How are the jumpers J51/J52 and J36/J37 configured? Check all jumpers related to RB6 and RB7.
How are you powering the board? Check the PIC voltage at Vdd/Vss pins, is it 5V? (Check all power selection jumpers.)
2. I wrote a simple program to toggle a GPIO pin (RB2). (...)
I don't remember how MPLAB IDE works, but in your attached image "Configuration bits set in code" is checked, so, I think you should set all configuration parameters in your code. You are only setting two: FOSC and WDT.
From the datasheet "On a Power-on Reset, RB4:RB0 are configured as analog inputs by default and read as ‘0’; RB7:RB5 are configured as digital inputs." So, you need to configure RB2 as digital.
Also, with your code you will not see the LED toggling ON/OFF. It will appear always ON since there is no delay between the OFF state and the ON state.
None of this previous points should interfere with programming the MCU. Check the board settings, as RISC mentioned.
You said "After couple of attempts both are passed.", so, you are able to program the PIC but not debug it, is that it?
The code built in programming mode is to just compile the code and program the MCU. The debug mode is intended to maintain the programmer/debugger attached to the MCU and do the debug (step, watch variables, etc.) using the source code.
3. Can I get any code for LED toggling, checking UART?
The code you provided should work (check RISC answer) if you set the configuration bits, turn that pin to digital and use a delay between the LED OFF and LED ON state.