There is a 2008 paper that tries to answer this question. They compare C3 and C4 photosynthesis.
Switching to LEDs you can try to match the spectrum and claim that improves efficiency, but LEDs are typically around 40-50 % wall plug efficiency so it kind of matters how you want to define the efficiency.
There are a lot of urban and indoor farming concepts, as well as greenhouse concepts where people are actively working on your question. A lot of time the value proposition is actually in the saving of water and maybe transportation costs. But I think a substantial part of the work is understanding the timing of when to illuminate the plants and understanding the phenotyping of the plants. By phenotyping, is the plant thin and spindly and wasting energy, how broad the leaves are etc and how that connects to the plant genetics. Apparently having some UV or Blue portion of the spectrum is important for some of this. There will probably be issues with plant disease, and while it is not important for plants like lettuce, some plants are stronger and more robust if they are exposed to wind forces.
With indoor lighting with LEDs that don't produce as much heat, you can have higher light intensities which helps the productivity.
Elevated light intensities made possible with LEDs increased photosynthetic activity, the number of tillers, biomass and yield. At lower light intensities, blue, green and far-red light operated antagonistically during the stem elongation period. High photosynthetic activity was achieved when at least 50% of red light was applied during cultivation. A high proportion of blue light prolonged the juvenile phase, while the shortest flowering time was achieved when the blue to red ratio was around one. Blue and far-red light affected the glutathione- and proline-dependent redox environment in leaves. LEDs, especially in Blue, Pink and Red Low Light (RedLL) regimens improved flour quality by modifying starch and protein content, dough strength and extensibility as demonstrated by the ratios of high to low molecular weight glutenins, ratios of glutenins to gliadins and gluten spread values. These results clearly show that LEDs are efficient for experimental wheat cultivation, and make it possible to optimize the growth conditions and to manipulate metabolism, yield and quality through modification of light quality and quantity. This other paper seems to be enthusiastic about LEDs and Wheat, but seems to compare to fluorescent lights rather than the sun. But in general it is complicated and will be interesting to see what happens over the next 20 years or so.