The difference between developing an application with a Pi can be very different or somewhat similar to developing an application with a microcontroller due to hardware differences as well as software development toolchain differences.
There are a wide range of microcontrollers available that are anywhere from 8 bit to 64 bit processors and having anywhere from a few K of RAM to a few gigabytes of RAM. More capable microcontrollers provide a more Pi like experience. Less capable microcontrollers do not.
And even with the Pi there are large differences between developing for the Windows 10 IoT operating system versus developing for Raspian, Mate, or other Linux based OS. Windows 10 IoT requires a development PC using a Visual Studio toolchain with remote debugger targeting the Universal Windows Program (UWP) environment. Development for Raspian or Mate can actually be done on a Pi with the tools available on the Pi.
The Constrained Application Protocol is used for small, constrained devices being used with the Internet of Things environment. To get an idea of the variety of microcontroller hardware and software, this page on the CoAP protocol implementation provides an idea of the environment it is targeting. It mentions the Contiki operating system which I have vaguely heard of along with better known OSs such as iOS, OSX, and Android. Programming languages mentioned are Java, JavaScript, C, C#, Ruby, Go, Erlang, Rust, and Python.
The tool chain used for development with microcontroller varies depending on the manufacturer as well as what kinds of resources are available from development communities and open source initiatives. In some cases you get a cross assembler, in other cases you get a C cross compiler, and in other cases you get a nice tool chain with all the bells and whistles and emulators and such similar to the Visual Studio toolchain for Windows 10 IoT.
The actual development environment for a microcontroller may involve using an EEPROM programmer and the software tools to create a new image and push it to the device or the device may have the necessary connectivity to allow a new image to be downloaded over a serial connection or over a network connection.
My impression is that most microcontrollers have a C cross compiler though the compiler may only support older standards such as K&R or maybe C98. C cross compilers often have non-standard keywords for microprocessor specific features for example the far
and near
keywords for pointers with the old 8080 and 8086 processors with their segmented memory.
There are also specialty languages that target microcontrollers such as FORTH programming language. These languages often have a run time design that targets the bare metal so that there is no operating system other than the language run time.
Operating system may range from practically non-existent to a bare bones Linux to a specialty OS such as freeRTOS or Windows Embedded or a full blown Linux or Microsoft Windows. See this SourceForge project MINIBIAN for Raspberry Pi. See as well this eBook, Baking Pi: Operating Systems Development which describes the development of a rudimentary OS for Raspberry Pi in assembler.
This article from Visual Studio Magazine, Programming the Internet of Things with Visual Studio, provides an overview of the many different devices available followed by an overview of using the Visual Studio IDE for development for Linux as well as Windows.
There's a huge and growing universe of off-the-shelf, programmable,
networkable microcontroller devices available now. At a very low level
you have a variety of simple 16- and 32-bit devices from a variety of
traditional chip makers like Texas Instruments. (I played a bit with
the SensorTag development kit and it's a lot of fun, making me think
the Watch DevPack might be a great learning toolset, too.)
Some better-known microcontroller devices include Arduino, BeagleBoard
and Raspberry Pi. These environments all have extensive community
support and are ready to plug in to a huge number of ready-made
external sensors, motors, servos and whatever else you might imagine.
Adafruit, the electronics learning superstore founded by Limor
"Ladyada" Fried, provides all sorts of peripherals for these boards,
along with its own line of lightweight Feather development boards.
...
The most interesting universe of devices for developers familiar with
the Microsoft .NET Framework and Visual Studio may be Windows 10 IoT
Core-compatible environments. These are x86 and ARM-powered devices
that support Universal Windows Platform (UWP) apps written in a
variety of languages including C#, Visual Basic, Python and
Node.js/JavaScript. Windows 10 IoT core supports devices including
Raspberry Pi, Arrow DragonBoard 410C, Intel Joule and Compute Stick
and MinnowBoard. There are also interesting product platforms, such as
the Askey TurboMate E1 wearable.
A Specific Example of a Microcontroller application
This is an image of a microcontroller board from an automated coffee maker. This appears to be a standard component for automated coffee makers manufactured in China. The web site for the manufacturer is printed on the PCB.
The image is composed of two views. The view on the left is the back of the board containing the microcontroller and supporting circuitry. The view on the right is the front of the board with the LCD screen and a set of buttons which are used to set the current time and to perform actions such as programming a start time, etc.
The view on the right fits into a carrier which then fits into an opening in the front of the coffee maker. The switches on the lower PCB are actuated with rocker arm switches. The LCD, which seems to be special purpose, is used to display the current time and status as well as to display the user interface when changing the settings of the coffee maker. The red LED is used to indicate when the coffee maker is actually making coffee and to indicate when done by turning the illumination back off.

The microcontroller is an ELAN Microelectronics Corp EM78P447NAM (datasheet) which is an 8 bit microcontroller. Some of the basic stats show what a small and minimal device this is however it works nicely for its intended purpose. The intent is to develop software which is then downloaded into the write once ROM as a part of manufacturing.
• Low power consumption:
* Less then 2.2 mA at 5V/4MHz
* Typically 35 µA, at 3V/32KHz
* Typically 2 µA, during sleep mode
• 4K × 13 bits on chip ROM
• Three protection bits to prevent intrusion of OTP memory codes
• One configuration register to accommodate user’s requirements
• 148× 8 bits on chip registers(SRAM, general purpose register)