Bioluminescence is produced by chemical reactions involving molecules called luciferins. These chemicals are able to produce light very efficiently without a lot of waste heat.
As for making them, well, we can. The reason we don’t use chemicals for lighting is because, while efficient, they aren’t very bright. Try lighting a room with a bucketful of fireflies and see how much illumination they’ll give you. Enough to see, but probably not enough to read by.
Another issue is that bioluminescence requires a constant feed of new chemicals to power it. You need something producing new luciferins, as well as oxygen to make it glow. Like a fire, oxygen will be consumed in the reaction and must be replenished, so you can’t keep it isolated in a tube. Less convenient than electric lamps.
But for situations that don’t require much light, scientists are already looking into it – check out this bacteria-powered lamp (https://www.wired.com/2015/01/lamp-whose-light-comes-bioluminescent-bacteria/)! It has it faults – it isn’t very bright, the bacteria need to be fed, and it needs to be in motion to keep the oxygen flowing. But still cool stuff.
It also turns out that luminescent genes are one of the easier things to splice into basically anything. Scientists have made glowing plants, fruit flies, shrimp, mice, rabbits, and even cats. I’ve heard of plans to use genetically engineered glowing trees instead of street lamps in some cities, so that’s something to look forward to.