To specifically answer your questions, I think it's reasonable that countries can deny visa applications, but I don't think they should be able to do so for behavior that would be legally be protected in the jurisdiction a person is trying to enter. I do not think the US should be able to deny visa applications for speech critical of the US government or Israel.
Once a person is in the country I would absolutely want for a judicial fact finding exercise to determine whether a person has violated the terms of their admittance. I would prefer that process to take the form of a jury trial, but practically speaking I will also accept the opportunity for people to appear before a judge as a workable but less than ideal situation.
For your final situation time in country changes things legally and entitles a person to a hearing before a judge. Ideally this would be a trial. Furthermore, it is repugnant to think that visas can be revoked for nothing but constitutionally protected activities, such as writing opinion pieces for a newspaper. I believe a judiciary not captured by fascists would find that such revocations are a violation of the plain letter of the first amendment and fourteenth amendment, and that the US government should not be able to take adverse actions against anyone for purely expressive activity.