Should I cut this lavender back?
I think overwatering/too much sun/soil not being draining enough has caused my lavender to go brown. What shoukd I do? How do I cut it back? Should I repot it into some grittier soil?
Yes, follow each flower stem down until you find the lowest healthy green growth and cut just above it; You want to remove some of the leaves as well as flowers to help it not to get leggy quickly, but don't cut into brown wood if there are no leaves below.
A trowel in the hand is worth a thousand lost under a bush.
edited July 2020
No. If you cut into old wood it won't regrow. I'd trim off the flowers and anything definitely dead. Then put it in a sheltered spot and just keep it moist. A bit of TLC should work wonders and once trimmed a bit it will look better. It might be better in the soil but I'd aim to get it going without taking it out of the pot, particularly if it hasn't been in the pot for long. Let it grow a good root system. They can be a bit awkward and don't care for being moved.
I've just read Bob the Gardener's post which appears to contradict mine! We both have said the same thing. I regard cutting back as a radical trim, almost to the ground!