We have investigated the electronic structure of double perovskites, Ba(2)FeReO(6) (metallic) and Ca(2)FeReO(6) (insulating) using optical and x-ray absorption spectroscopy. By comparing the experimental results with the density functional theory calculations, we found that the electronic structure of Ba(2)FeReO(6) could be determined from the interaction of the electron correlation and spin-orbit coupling. On the other hand, for Ca(2)FeReO(6), the lattice distortion and electron correlation are important in determining the electronic structure. Additionally, the insulating gap in Ca(2)FeReO(6) is realized by the spin-orbit coupling. Our work shows that the subtle interplay of the spin-orbit interaction, electron correlation, and lattice distortion should be taken into account to understand the electronic structure of the 5d transition metal oxides.