First of all we should mention that our illnesses are a result of Adam’s fall. In paradise there were no illnesses. So, demonic energy is more or less involved in various degrees and because of various causes and for various purposes: to pay off for a particular sin, to stop someone from a wrong path or for one to receive a higher degree of spiritual knowledge etc.
The answer can be much more complex but in a few words, one can distinguish between a medical condition and a demonic activity if a priest, monk or someone else knowledgeable can test the behavior of the patients relative to acts – for example confession – or things which have Grace in them.
Saint Paisios of Mount Athos when he had someone which was epileptic or another disease which can be in fact a demonic attack of a big(ger) magnitude did a series of tests in order to ensure this:
He gave a lot of sweets to the suspect and kept him in a warm place in order to force him to drink water. Then he brought a glass filled with Holy Water. If the suspect started to take the glass but frightened would place it down immediately after or wanted to drink but couldn’t, then it was considered of demonic influence.
Also he would hide in one of his fists some Holy Relics – usually of Saint Arsenios the Cappadocian. If the suspect looked constantly frightened to his fist, it was again considered as high demonic activity.
However, the standard test is the veneration of the Holy and True Cross (especially a piece from the wood of the Holy Cross) – if the suspect could not venerate (kiss) the Cross, or avoiding the Cross while at the same time having the symptoms of a cold sweat and of a paleness color to his face – then all these are signs indicated of high degree of demonic activity. The same can happen with other relics, of course.
Sometimes cold sweats and pale color appears at the readings of the New Testament. There are concrete cases of people which were students at the Faculty of Theology and had absolutely no problem at any class, except the class of New Testament. They were demonized – a thing which became clear when the priest read the Exorcisms.
We must always remember that there is an unseen spiritual world which is very concrete and active, even if our eyes cannot normally see it.
The photos are candid shots from the Exaltation of the Holy Cross in which one of the pieces of the True Cross was put as relic for veneration.