Whilst I agree with other posters that the sister has a right to feel put out because life/property ownership didn't turn out as she planned it, I also agree with this poster that OP has a right to feel put out at her sister suing her now.
No doubt OP wanted to sell the house quickly 2yrs ago when she moved in with her boyfriend. Maybe not having the equity to put into a property with him meant they had to rent? Or left her more broke with higher mortgage payments than she otherwise would have had? Or possibly having to pay capital gains tax now because the property she lived in with her sister is now a second property OP isn't living in? At the end of the day if she co-owned a flat for 2yrs she had every right to want that flat rented out during tha time. That's what most people would do with a property they owned but weren't living in. If she forgoes rent in favour of letting her sister continue to live there, it's fair enough to consider it quid pro quo that OP didn't pay the mortgage for 2yrs IMO. Market rent would have likely been more than the mortgage payment, so OP has lost out there. The sister has gained by only having to pay OP's share of the mortgage and not having to pay half of whatever market rent would have been.
I understand that the sister may feel annoyed at OP wanting to sell after 4yrs, but I'm assuming they're relatively young and of a dating mindset when they purchased the property (as opposed to eg about 60, ranting about being done with men, and buying a retirement property together). It could have reasonably been forseen by both parties that one or the other of them would at some point want to move in with someone else. And that it might happen at an inconvenient time for the other party.
It's unreasonable for the sister to have expected to live in the property with OP forever. Or to live there until she decided she wanted to sell. Or, as I suspect has happened, to drag her heels on the sale because she didn't actually want it sold (and was living there so what did she have to lose?).
The sister may feel shafted, but at the end of the day she's lived rent free for 2yrs and should be grateful for that. OP could have done more to force the sale of the house 2yrs ago, I expect, but didn't because it was her sister living there. If the sister had wanted it to be more official she should have paid rent for 2yrs, allowing OP the option of affording to pay her half of the mortgage for those 2yrs.
OP if your sister wants 2yrs of half the mortgage payments from you, I'd countersue for 2yrs of half market rental value from her. That's fair. Or you can both stick to the original agreement where you co owned the property and were entitled to 50% of the equity each upon sale, but your sister paid the mortgage alone for 2yrs because she lived there alone. She's the one trying to change the agreement now, personally I think she's daft and being grabby.