Catalyzes the reduction of soluble flavins by reduced pyridine nucleotides. NADP(+) + reduced riboflavin = 2 H(+) + NADPH + riboflavin NAD(+) + reduced riboflavin = 2 H(+) + NADH + riboflavin Monomer. Belongs to the Fre/LuxG FAD/NAD(P) flavoprotein oxidoreductase family.