It's not really a stretch to say that, underneath all of that rich mythology, Star Wars is essentially an exploration of love. It's what drives the heroes of these stories forward and—for better or worse—shapes the fate of an entire galaxy. Therefore, it is rather curious to see that that right in the middle of it, you have a group of people, who have effectively decided that they're better off without it—the Jedi.
In fact, it's quite literally written in their Code that forbids attachment or any kind of romantic relationship. And, well, while there are some genuinely valid reasons why an Order like this should operate that way, a closer look unfortunately reveals it to be yet another addition to the long list of reasons why the Jedi were a bit out of their depth during the last days of the Republic. So, let's take a look how a little bit of love would have gone a long way to improve the Jedi Order, as we deconstruct two of the main arguments behind their rather strange anti-love stance.
1. Attachment, Fear of Loss, and the Dark Side
The fear of loss is a path to the dark side. Attachment leads to jealousy the shadow of greed that is. Train yourself to let go of everything you fear to lose. - Master Yoda.
Now, to be fair towards the Jedi, their purpose was not necessarily to forbid love, but rather to avoid the consequences it could bring along like attachment that leads to jealousy, fear of loss and ultimately to the dark side. And, well, one only needs to look at Anakin's story to see that they might have a point here, as it was his fear of losing the one he loved (Padme) that pushed him over the edge towards darkness. Yet, can we really pin it on love?
Thing is, while Anakin did turn to the dark side to save Padme, it stands to reason that had the Jedi been more liberal in regards to forming romantic relationships, he would have never turned. You see, Anakin's time in the Jedi Order was essentially a case of constant suppression of his strongest feelings. He had to abandon his mother (only to witness her die years later), saw his apprentice—Ahsoka—leave the Order after being falsely accused of a crime and, of course, not only was he forced to hide his feelings for Padme, but he was also basically told to let her die, when discreetly touching upon the fear of loosing her.
Now, add to that the overall sense of distrust between him and many members of the Jedi Council, and it's not really a surprise that a master manipulator like Palpatine was able to use all these suppressed emotions and slowly lure the young Jedi towards the dark side. In fact, it's not a stretch to imagine that had the Jedi been more open to teaching their younglings about how to deal with romantic feelings, it would have given Anakin some much needed perspective to better handle the fear of losing Padme.
However, by far the most important notion here is the fact that while love for his wife did play a part in Anakin's turn towards the dark side, it was also love (for his son Luke) that brought him back to light. Therefore, to say that love is a pathway to the dark side becomes a bit of an empty statement, as it works both ways. In fact, Kylo Ren's quest to become stronger in the dark side is basically an act of suppressing love.
2. Love Can Cloud One's Judgement
Love can make us do crazy things and act irrational. That is for granted. Therefore, it's easy to see why it doesn't really gel that well with the whole quest for spiritual enlightenment central to a Jedi's life. And, well, once again, the saga does offer us some moments that seem to back this notion. Take Luke's decision to abandon his training with Yoda to go and save his friends in The Empire Strikes Back. He knew that finishing his training was of crucial importance, he knew that he was walking into an obvious trap and yet the love for his friends still made him go. And, well, needless to say, it went down just about as well as one would expect from circumstances like that.
Yet, let's not forget that it was this same love towards his close ones that enabled him to see good in Vader, where others only saw evil (Return of the Jedi). Furthermore, it was also what made him come out of his exile and save the day many decades later (The Last Jedi). Simply put, while he had become disillusioned by much of what he used to believe in, he understood that you can always believe in protecting the ones you care about. In other words, it was love that made Luke proactive again.
It's a notion, that is also powerfully represented throughout the romance between Thane Kyrell and Ciena Ree in the excellent novel Lost Stars, where we follow the story of two lovers, who find themselves on different sides of a conflict (Thane for the Rebellion and Ciena for the Empire).
Now, the key here is that each one has some major reservations towards their alliances. For Ciena, it's about remaining loyal to the Empire and her sense of responsibility, while obviously being unable to turn a blind eye to all the atrocities committed by this regime. Thane, on the other hand, struggles with the quilt of abandoning many of his friends (including Ciena) and the fact that when the Rebellion destroyed the Death Star along with the baddies on it, they also killed countless of innocent people (including many of Thane's friends), who were stationed on this gigantic space station and just doing their day-to-day jobs.
Therefore, neither is really sure what to believe in, which means that—as cheesy as it sounds—the love for each other is just about the only beacon of clarity they have in this galaxy full of gray areas.
When Padme asked Anakin on whether the Jedi Code forbids him to love, the young Padawan gave a rather interesting response:
Attachment is forbidden. Possession is forbidden. Compassion, which I would define as unconditional love, is essential to a Jedi's life. So you might say, that we are encouraged to love.
Now, while this reasoning obviously had more to do with Anakin thinking with something else than his head (of course I'm referring to heart here), it is undeniably a fascinating way to interpret the philosophy of the Jedi. Perhaps even one that would have enabled them to be the true force of good they always intended to be.