It is quite common for a Visa application to be turned down by a Country’s Consulate office (or 'Foreigners Office' if the application was made in country).
There are many different reasons why this might occur, but often it is simply an administrative matter: either there was some required information missing when the application was made.
If your visa application is rejected, a lawyer can check the application and the supporting documentation that was submitted along with it, to see if there were any obvious errors or missing information. The lawyer will also consider any information provided by the Consulate in relation to the reason for the rejection.
Depending on the nature of the application, it may be possible to make an administrative appeal to the Consulate. If this is not possible, or indeed if such an appeal were to be rejected, a further appeal is possible, typically to a Superior Court in the capital city.