Every kind of communication from inside the prison to outside the prison might cause the problems you describe, no matter if snail mail, phone calls or internet. How large the problem is depends on how restrictive the communication is and how extensively it is monitored and of course the individual motivation of prisoners to misuse this communication path.
Like everything in security it is a trade-off, this time between allowing prisoners a better integration into the current society where internet is an essential part on one side and the risks that such communication might be misused on the other side.
While it is technically possible to restrict access to only a few sites, this at the same time might make internet access practically unusable and thus does not provide the intended effects why internet was allowed in the first place.