Virtual private network is legal in the vast majority of jurisdictions around the world and are widely used by individuals and companies to protect their data, including in countries with highly restrictive governments. Even where Apps might be seen as discouraged, many governments tacitly endorse their use by officials, academics, or businesses to stay competitive in an interconnected world. It is simply not practical for countries to ban all Apps.
Of course, illegal online activity is always illegal, whether you are using an App or not.