I'm no expert, but there are a few things I've heard repeated many times:
1) route downspouts away from the house
2) grade the land so that it slopes away from the house
3) make sure sump pump(s) discharge away from the house.
How old is this house? There should be a drain tile buried around the outside of the footers, which drains into a sump and gets discharged either into a storm sewer or outside your property. If that system isn't working, or if the house never had one, that might explain the trench in the basement.