Sugar solutions that have different concentrations have different densities; the more sugar in a solution the more dense it is. Therefore less dense solutions can be layered on top of denser ones.
When M&M’s are placed in water, the outer shell, which is made of sugar, dissolves. The sugar moves from a place of high concentration (the M&M) to a place of low concentration (the water away from the M&M). When the sugar shell dissolves and moves outward, it takes the layer of food dye with it. When more than one M&M is placed into a petri dish the colors do not mix because the concentration of sugar at the interface is approximately the same. Also, around the bottom of the M&M water appears cloudy because the sugar that is dissolved is more dense than the water, so it sinks.
Hot water expands so it is less dense than room temperature water. Cold water contracts so it is more dense than room temperature water. The red hot water rises and the blue cold water sinks.
Diet soda contains artificial sweeteners while regular soda has sugar in it. Artificial sweeteners are so sweet so only a small amount is needed, where as much more sugar is needed to achieve the same sweetness. Because regular soda has more mass in the same size can, it is more dense than the diet soda.