Density Functional Theory-Generalised Gradient Approximation (DFT-GGA)is employed to study electronic and optical properties of B x Ga 1−x N and Al x Ga 1−x Nternary alloys. The properties determined are equilibrium lattice parameter,bulk modulus, band structure, density of states(DOS), band gap, real and imagi-nary dielectric functions, static dielectric function, refractive index, static refrac-tive index, absorption coefficient, and intrinsic interband absorption. The directband gaps of these alloys are tuned up to 2.95eV for B x Ga 1−x N and 3.12eV forAl x Ga 1−x N . The results obtained in this work are in excellent agreement withother theoretical and experimental works. The calculation indicates that thesealloys are potential candidates of ultraviolet Light Emitting Diodes(LEDs) andultraviolet Laser Diodes(LDs).