Answer: There are a multiplicity of issues and problems with purported visions of the Virgin Mary. The most well known vision, certainly in relatively modern times, is the example you give.
Fatima, located in Portugal, is the place where in 1917 three children reported to have seen six appearances of the Virgin Mary (on the 13th of six consecutive months). One of the three children said the apparition did not refer to itself by name but rather as "our lady of the rosary." These manifestations or visions (endorsed by the Catholics) revealed the following three "secrets."
The first visions supposidly revealed the existence of an ever-burning hell populated by demons and the souls of humans. It also declared that the Pope would consecrate Russia toward the "immaculate heart of Mary" and that her conversion would come. The last secret revealed was that the Pope would be martyred, as well as lesser Catholic leaders and others.
One of the primary assumptions regarding manifestations of the Virgin Mary is that those who have died are not actually dead, but rather live on as immortal souls in either heaven or hell. The belief that the "soul" of a person continues a conscious existence right after death is NOT a doctrine found in the Bible (see our article on the immortal soul).
It is impossible for the Virgin Mary to visit anyone since she is dead and unconscious until the resurrection. This begs the question, however, of who or what visited those in Fatima (or anyone who claims to see Jesus' mother). We know God and his righteous angels have visited humans (e.g. God talking directly with Moses, an angel appearing to annouce the birth of John the Baptist and Jesus, etc.).
It should be noted that evil, lying angels (demons) certainly can and do visit humans on planet earth. The Bible does teach about people who see a FALSE visions (not inspired by God) then relay what they saw to others as if the message came from the Eternal (Jeremiah 14:14). A good case of someone communicating with an evil spirit is King Saul when he consulted the witch of Endor (1Samuel 28:3 - 25).
One way to judge visions (whether they seem to be from the Virgin Mary or anyone else) is to determine whether or not what they say agrees with prior revelations from God and whether or not they always come true if they are predictions (see Deuteronomy 13:1 - 5, 18:18 - 22). If a spirit makes any statements that do not agree with sound Biblical teachings or makes false predictions, then they are not from God.
Either the children lied about seeing visions or what they saw was not literally Jesus' glorified mother Mary for some of the following reasons.
Praying the rosary in order to enter heaven, or trusting in the 'immaculate heart,' contradicts what the Bible teaches is God's plan for saving mankind.
We are not to pray to the Virgin Mary since only God should be worshipped (see Luke 4:8, which cites Deuteronomy 6:13). It is only through the name of Jesus Christ we are saved (John 14:6, Acts 4:10 - 12).
Mary is not alive but dead. She is unconscious and awaiting the resurrection like all the saints.
The prophecies regarding Russian consecration to the 'immaculate heart,' the martyrdom of the Pope and Catholic leaders, and so on did not happen. This means the "virgin" the children supposidly saw told false prophecies!
There is not a single Biblical example of dead human beings (not a demon pretending to be one) like Mary manifesting themselves in visions to those who are alive!
In conclusion, any seeming visions of the Virgin Mary do not come from God. They are lying wonders inspired by his adversary.