It is narrated that Imam Ali (A) spoke with the deceased in Wadi al-Salaam just by talking to them.
Anyway, the problem with trying to communicate with deceased people is that even if one feels one is getting communication, it is impossible to prove whether or not it actually comes from the deceased person (as opposed to, say, jinn, or one's imagination, or something else).
Also it is better to let the deceased go and not to try to hold on to them as they have their own journey to make after this life. It is also not healthy for us to try to hold on to people after their time has come. It is better to have a clean break, mourn, and go on.
However, if there is something important to be resolved (for instance, a very bad relationship during this life, or something very important to know), I don't think there is any harm in simply speaking to them at their gravesite (if it is accessible/if they were buried) or even during a quiet time like after prayer, in hopes that it might be heard. After all, the way that the material world works is different from the way that the barzakh works. Many of us are often talking to Imam Husain (A), Fatima al-Zahra (A), etc, anyway, although they are deceased, and often even waiting to hear back from them somehow!
If Allah wills, one might find some sort of response sometime (for most people this sort of thing is in dreams), and perhaps not, but at least one did what one did.
A minority of people have a strong inborn sense of perception of things that are generally not visible to other people and this is not always relating to piety, it is just a sense like any other sense, in the same way that some people are born with perfect pitch or an artistic eye.
Some people have extensive a'mal for trying to speak to deceased people; I am not aware of any benefit or usefulness in them (but of course I cannot speak for everything as I am not familiar with everything).
The best thing to do for the deceased is to pray for them or do good acts in their memory anyway.