Diesel fuels have been in use for over a century, and both the use and production of these fuels have expanded to encompass a wide range of processes and purposes. Red and green diesel fuels are not strictly related or comparative, and are just two examples of this phenomenon.
Red diesel is diesel oil that has been dyed red to identify it for a specific purpose. The dyes that are used can be detected at extremely low levels, even if the fuel has been mixed with a large percentage of un-dyed fuel. Specific laws vary from country to country, but typically red dyed diesel indicates oil that is intended for off-road use or use as a heating oil, and therefore isn't subject to the higher tax of consumer motor fuel.
Unlike red diesel, green diesel doesn't literally refer to the color of the oil. It refers to a form of production of the oil that is more economically friendly than traditional diesel oil, which is a byproduct of the petroleum refinement process. While both green diesel and biodiesel are created from plant and animal fats, green diesel uses oil refining technology to achieve a product that is more chemically similar to traditionally refined oils.
Though red and green diesel may appear to be two very different diesel products, they are both reflective of an increased effort in recent years to control the creation and consumption of oil. Red diesel's existence is largely related to the taxation of motor oil, while green diesel is an attempt to replace a non-renewable resource with a chemically similar renewable product.