When I play chess on say lichess.org, I can see whether my move is good or not according to Stockfish. I can see why some moves are obvious blunders or mistakes, but for some other moves I don't really know why said move is bad/good. Is there a heuristic or engine or some rules I can use to see why a move is good or bad?
As far as I know, there is no engine that does what you are looking for. An engine is a program that does nothing more than take certain positional and material elements into account, and gives it an evaluation. It does not break down the elements and show you how it evaluated each of them. Sometimes, it can be obvious because the analysis is a clear win of material, but most of chess is more deeply hidden than that....sometimes VERY deeply hidden.
I found a site that does what you are asking. It takes those evaluations, and tries to put words and understanding to the numbers.
You it on one of the problems with chess-analysis software for weaker players, and that is that it just shows the strongest move per the computer, without any explanation why. There are some programs, like the ChessBase programs that, using their "Tactical Analysis" feature, attempt to give some explanation to the moves, but they are all wanting.
That said, decodechess.com seems to do better than most for newbies. As a USCF Master, the explanations are pretty good from what I can see, and the underlying "engine" is the same Stockfish that you use. Although a premium account is $99/year (right now, 50% off with the promo code "getserious". for the record, I have no affiliation with the site, nor am I a member), you can create an account, and "decode", or analyze three games per day for free. If you like it, I would jump on the promo.
Heuristics can only get you so far, at the end of the day chess is a highly contextual game which means, in order to understand why a given move is good or bad, you can never do without the concrete assessment of lines of play that can arise from that move. Obviously, one cannot go to arbitrary depths in the calculations, so at some point you need to make a judgement, based on your experience and positional understanding, and stop your calculations and evaluate the reached positions.
On the one hand, learning more about chess principles will render your calculations more efficient, as you'll get better at dismissing the irrelevant move candidates. It will also allow you to evaluate more accurately the intermediate and end positions that you reach at the end of your calculations. On the other hand, experience and practice will improve your tactical awareness, calculation speed and the depth you can see without moving the pieces.
When it comes to understanding why an engine evaluates a move as good or bad, if at first according to your calculations and your knowledge of chess principles it is not clear to you, then you should simply rely on the concrete lines of play and explore them with/without the engine. In other words, in a live analysis session, simply play out the main lines that ensue with and without the move you're trying to understand, then compare them. The comparison will better highlight the impact of the move on the consequent positions. This does not mean you can expect to understand any move in any positions, because chess is a highly complex game, and with time, as you get better at it, you'll discover deeper concepts and layers of reasoning behind a move or plan.
These discussions basically mean that in order to evaluate a move, concrete play and principle-based assessment of positions will always and unavoidably go hand in hand. Think of for instance how we find positional combinations (other combinations would be mating ones, or ones that win material) in chess: First we spot an idea (e.g. doubling our opponent's pawns), then we calculate the relevant variations (such as the repercussion of intermezzo check moves), and last, we evaluate the final positions (e.g. in terms of king safety, material balance, pawn structure etc). Therefore to find a combination, the concrete and positional assessment are both required.
Let's end with an example:
A typical Dragon position, and say we played the move
8.Qd2 in the diagram below, and afterwards learned that the engine did not like it at all. Then we see the engine suggests immediately
8...Ng4!! attacking the bishop on
e3 first chance given!
A strategic blunder by white to allow the trade of the dark-squared B for a N.
Strategically, if the trade of the
g4 knight with the
e3 bishop happens, then black will stand really well thank to their dark squared bishop dominating the long diagonal. So we realise
8.Qd2 was premature as first we needed to secure the
g4 square with e.g.
Qd2 can be played having ensured we preserve our dark-squared bishop. This entails the principled approach to understanding
Ng4, since the dark-squared bishop is vital to black's play in the Dragon variation of the Sicilian.
Next question should be: "but can white really not avoid the trade by some dynamic play?" By their nature, these questions cannot be answered by the mere application of chess principles, instead, one needs to concretely go through some of the possible lines of play for white and see what kinds of positions they are leading too. For instance, starting from
9.Nxc6 with the idea to play
Bd4 trading the bishops in case of
9...bxc6 (left diagram, green marks white moves, red black's). But then we need to step back again, and consider what if black recaptures on
c6 with the
d pawn (right diagram) and thus preventing
Bd4? Then we need to assess which side has a better development and minor piece coordination after the trade of queens, and the fun continues...
[title "Sicilian Dragon, example 1: why 8.Qd2 is bad?"] [fen ""] [startply "15"] 1. e4 c5 2. Nf3 Nc6 3. d4 cxd4 4. Nxd4 g6 5. Nc3 Bg7 6. Be3 Nf6 7. Bc4 O-O 8. Qd2 Ng4 9. Nxc6 dxc6 (9...bxc6 10. Bd4) 10. Qxd8 Rxd8 11. Bf4
Engine will rate a move as bad when it leads to a disadvantage that can be exploited (sometimes only by a very strong player). There's a myriad of ways in which you can weaken your position and there's no heuristic that guarantees you'll be able to avoid them (that's the beauty of the game!). I'd suggest doing an analysis of the game and following the variation with the help of the engine. Often the answer on what the threat was reveals itself quite within couple / several moves!