I am developing code in the MPLAB IDE and I was wondering if it is better to program a chip using the .COFF or .HEX file generated by the compiler. I'm not sure what the difference is between the two and I am assuming they will both perform the same job.
A COFF will typically contain debugging information (line numbers, symbols, etc.) that is useful when running the code in the IDE. The .hex format just contains the program's binary data, and is what you'd typically use to program the microcontrollers for production.
IIRC, you debug a Microchip controller by burning the code to flash, then using the ICD to step through your code, set breakpoints, etc., so either COFF or HEX will suffice. But with COFF, you have the link back to the source code that will make the debugging process much, much easier.