by useing chemosynthesis, which bacteria in tubeworms already do, and it technically comes from suns, otherwise, heat, like a thermal plants (where we get energy from) you could make your plant use heat and turn it into energy, the thing here is the temperature- it has to be high, so either your planet had some sort of catastrophe wich heated the core, is quite new and life evolved vey quickly, or is closer to the sun
edit, tubeworms are in a place with no light what so ever, at the bottom of the sea
and they also use some heat as they live near thermal vents, so there, your answer