The basic theory is simple... look at the "supply chain" and work with it. For example, minerals come from stations near mining outposts, and go to refining stations. Metals go from there to industrial stations. Finished items go from there to pretty much everywhere. Technical stations import food and other basics, and make tech for all the other places. Similarly food products come from agricultural stations to everywhere else, and they import finished products. Rich planets buy and sell at high prices than poor planets. Look at the description of the station you're at (eg: poor agricultural planet), then look at the supply & demand in the market. Anything that's medium-high numbers in the supply is something they'll sell fairly cheap, and anything that's low numbers in the demand is something they'll want to buy.
That's all a bit overwhelming at first so while it's not an official "tool" it also has been semi-officially "not condemned" too, so I would recommend getting "Slopey's Market Tool" from
here. It uploads the market prices from every station that every user visits to a big database, and downloads updated prices for all the markets that have been visited every 30 seconds or so. It'll help you find the best prices that are available for the products they sell where you are, just make sure you can actually get to the places it suggest you go BEFORE committing to buy those products. That'll help a lot until it starts making sense to you and you can start using your own judgement.