Yes, in most countries, it is completely legal to use proxy servers. On the other hand, in some regions, proxy usage may be limited due to local legislation.
In general, it is legal to use proxy services for legitimate purposes. But if your country imposes restrictions on any content, the authorities definitely don't want you to see it. In this case, the proxies are in the gray area. Some web resources also have a policy that prohibits proxies. However, some types of servers cannot be detected, so it's not a big deal to use them worldwide.