Error in turning ON the LED using UART in PIC32
You have a bug in your code. 

In this section:

 else if(RxBuffer[0] == '5')
    {
        PORTDbits.RD0 = 0;
        putsUART2("&gt;&gt;LED: 2 OFF");
        memset(RxBuffer,0,5*sizeof(char));
    }


You should be setting .RD1 to zero instead of .RD0.