Bernie Sanders has said that even if he did not get elected his candidacy would change the conversation about major issues. I don't know for sure that his opposition to XL was the ultimate cause of Clinton's stand. Pope Francis' climate change encyclical might have had something to do with it. Regardless, Clinton has finally taken a position and followed suit on XL. That was not always her position, but now that she has publicly opposed it, it is a win for environmentalists.
Details are in a report at Common Dreams cited by Bob Lord at Blog for Arizona. Given the history of Clinton's non-positions and possible positions on XL, you should understand, and might forgive, the biting comments in both reports.