A five year old girl from California bit her father and said her imaginary friend told her to do it she sank her teeth into her fathers chin they took her to a therapist because he thought she needed help she told them her friend was right beside her but there was nobody there so yes I think they are dangerous!!!
If a person is hearing voices, especially ones that are negative or say to do evil, then there is definitely a problem. However, there are those who say that when young children have imaginary friends they are closer to benevolent angelic beings who really exist than most of the rest of us are. If that's so, then it is not a problem no matter when in life it happens.
Some children do not have friends to play with and are lonely. It is perfectly normal and healthy for these children to have imaginary friends. How is this different from having a conversation in your head or talking to oneself? As long as the child knows their friend is imaginary there is not a problem.