Due to urbanization, utilization of electricity has been enhanced which increasing the construction of new lines and usages of more inductive loads. Due to this the losses in the transmission system increased and voltage profile values deviated from the specified value which causes to increase the cost of the real power generation. So, for avoiding these problems, proper reactive Power compensation should be done in transmission systems. Reactive power is controlled properly by installing Flexible AC Transmission System devices (FACTS). Unified Power Flow Controller (UPFC) is Voltage source converter type FACTS device which increase the voltage profile and reduce the losses. The parameter setting of UPFC is a challenging task, in this paper it is achieved by using resent metaheuristic optimization algorithm called firefly algorithm (FA). In this optimization process, a multi-objective function is considered. This consists of four objectives those are total transmission line loss, voltage deviation, the cost of true power generation & the branch loading. To validate the proposed approach IEEE 14-bus & IEEE 30-bus systems have been measured in MATLAB environment. Genetic Algorithm (GA) has been used for comparison purpose. The results indicate that FA gives better results in both the cases compared to GA.