Why did the Brain develop in the front in most organisms?
TL;DR Visual and auditory systems are crucial for survival, especially in higher animals. Also, visual/auditory systems have great number of cells. For processing to be effective, it should be performed closer to data acquisition (eyes).

First of all, for example, in mouse or human, central nervous system includes brain and spinal cord. Since spinal cord is extremely important at regulating different physiological processes as well as in performing complicated motor tasks, it would be unjust to not think about CNS as a whole.

If you talk only about brain part of CNS, it makes sense to locate important processing pathways near sensitive organs for two reasons. First, it saves material on running long axons from many sensory cells. Secondly, longer axons deliver information slower. If there is a sense that is important for survival, than information in that modality must be delivered and processes as quick as possible.

In comments to the question @anongoodnurse mentioned that "butterflies 'taste' with their feet". I would argue that a) taste in butterflies is not vital for immediate survival and b) number of taste buds is very limited, whereas retinal cells are count up to more than thousand per eye.

But what about humans? We also able to "taste with our feet", e.g. feel temperature. For survival it is crucial to be able to escape hot surface as fast as we can. And we do, thanks to a direct reflex arc going from sensory cells to spinal cord and motor neurons. Which brings back point about CNS as a whole system. Crucial information and immediate decisions are made closer to sensitive organs.