While I program microcontrollers professionally (my co-worker builds them), it is only a side business. A necessary evil so to speak.
Our boards are roughly digital I/O boards connected to the PC on one side (ethernet, serial 232/422) and the customers PLC's on the other side. The reason is mainly because customers seem to have chosen to standarize on a different PLC.
Usually the boards also provide encoder signals to other electronics (lamps and cameras). Everything galvanically insulated and capable of working with relatively high (50k+) frequencies. (no rocket science, but know your components). Small series, think several tens an year.
While we started with Microchip PIC18, we moved on to dspic33, except for the ethernet parts which still are PIC18 (the dspic33 16-bit parts with ethernet are scheduled for this summer I believe).
Think 2 serial in, 32 digital out + 16 digital in, CAN, (to link multiple boards), SPI (extra I/O expansion) and encoder building blocks. The boards have multiple options to place the components (e.g. RS422 instead of 232, inverting the polarity of the inputs etc)
A lot of work went into deciding which pins to use for what (these don't have a crossbar switch to software select pins), so that the pins are chosen in a way that some of the pins can be used for different purposes, e.g. pins with hardware counters attached to them are used as inputs, similarly for the second SPI port etc.
We program them in mplab, and usually the software is pretty simple, but gives us great flexibility. Most of the heavily lifting is done by the peripheral components (counters, de/encoder parts, pins with interrupts attached etc), and the code doesn't have to be very optimized since it is only rarely pollling.