Your question is not really specific, so I don't know exactly what's being asked, but here are a couple of things to think about.
1. Illusions are caused when the brain makes what it thinks is a reasonable assumption, but the input contradicts that assumption.
For example, our visual system has developed over the ages to interpret the same object as small when far away, or large when close up. This perspective effect helps us as predators/prey, for example. So, a standard illusion would be to place two equal-size objects in such a perspective field: the object that is "in the distance" will appear larger, although it isn't. It's reasonable for your brain to do so, since it was designed or prewired to make such interpretations. Presumably, it was not evolutionarily advantageous or efficient for our neurons to detect such optical illusions: a lion running toward you gets bigger, that's all your brain needs to know.
2. You don't have enough neurons in your retina to receive light for every single point that you see when you have your eyes open. For example, even though you think your eyes are responding to a white spot on a white wall, and telling your brain that there is "white" here, in fact, chances are your brain is filling in the white for you and not responding to any retinal neurons at all. Instead, your retinal neurons are trained to recognize differences in intensities, so that they will fire only if there is a change. You can imagine your retina's neurons are more like a huge edge detection machine. So, if you have a millimeter each of black-blue-blue-blue-blue-black in sequence, your eyes will only respond to the first black-blue and to the last blue-black. Your brain will fill in the middle part. I believe this is another kind of illusion. The reason for this is purely economical and again for efficiency: you want to minimize the number of neurons required to make a sufficient and correct assessment of the outside world.
I imagine you can find similar analogies for auditory illusions.
Hope this helps.