I've seen that in some aerobatic planes like the Edge 540, the back of the wings are swept forward. Why is that? Does it help in maneuverability?

Photo from https://en.wikipedia.org/wiki/File:Edge_540_In_Flight_1.jpg
I've seen that in some aerobatic planes like the Edge 540, the back of the wings are swept forward. Why is that? Does it help in maneuverability?

Photo from https://en.wikipedia.org/wiki/File:Edge_540_In_Flight_1.jpg
It is not so much that the trailing edge is swept forward as that the leading edge is held to zero sweep.
One way to approximate an elliptical lift distribution (without twisting a wing) is to taper the wing with a taper ratio between 0.4 and 0.6. The 540's taper ratio is about 0.46. Enough to improve the load distribution, but without being so aggressive as to make tip stall a problem.
Often general aviation wings (solidly subsonic) will have a straight quarter-chord. This allows them to have a straight spar and load carrythrough structure.
The 540 instead has a straight leading edge. This is most likely to give it a striking appearance from the ground during aerobatic displays. Maneuvers like vertical flight, 16-point rolls, and 16-point rolls during vertical flight will look better with a wing that meets the direction of flight at 90-degrees. This will also help aerobatic judges appreciate the precision of the maneuvers being executed.
This is actually a very nice example of the compromises normally encountered in the aerospace world.
This being an aerobatic airplane, the wing should ideally deliver the same handling qualities both when flying upright and also when flying upside-down. This implies that all the standard techniques normally used to tailor the flight characteristics of the airplane cannot be used because they are normally not symmetrical when the wing is upside-down. For example, the wing should be vertically positioned in the middle, i.e. not on the bottom of the fuselage like in a jetliner (so called low-wing) nor on the top of the fuselage like in a cargo plane (high-wing). And already this single choice has a lot of consequences like the fact that the wing's structure just cut the fuselage in the middle and therefore nothing can be put there: see for example how the pilot seats behind the wing and the engine in front.
For the same reason, dihedral cannot be implemented: if you look at a jetliner's wing from the front, you'll notice that the wing goes up a bit, while in a cargo plane it goes down; dihedral is normally used to adjust the stability of the wing but, as before, in an acrobatic airplane if it would positively contribute to the stability when the airplane flies upright then it would be destabilising when flying upside-down.
Another way to optimise the aerodynamic characteristics is by using washout i.e. adjusting the local angle of incidence of each section of the wing. But, again, this method would have the same problem as before i.e. a washout optimised to fly upright would be detrimental when flying upside-down.
So in an aerobatic airplane if some in-/stability is needed, all that's left to do is sweeping the wing. In particular, sweeping the wing forward moves the lift at the tip a bit forward reducing stability, something which might be beneficial for this kind of airplane.
Note that this wing is not only swept forward but also tapered i.e. the chord at the tip is smaller than the chord at the root. This is done to optimise the spanwise lift distribution and generate less induced drag.
The primary reason for forward swept wings in aerobatic aircraft is maneuverability and controllability. Wing sweep is measured at quarter chord. Trailing edge sweep is the result of wing sweep and taper. It is not normally thought of as a design driver. Other answers deal sufficiently with taper.
Forward-swept wings also are able to maneuver at high angles of attack. The Grumman X-29b was found to be able to maneuver and not stall up to 67 degrees angle of attack. Good maneuverability was maintained at 45 degrees angle of attack.
why are the back of the wings of some aerobatic planes swept forward?
To optimize performance in high G loading and high angle of attack turning maneuvers.
This is an answer a pilot from 1918 might understand better than many of the higher Mach cruise-performance bred engineers of today.
Vortex formation is much more pronounced at high angles of attack, and tapering of the trailing edge is a well known technique of reducing drag, making the aircraft more responsive when power is added to accelerate$^1$.
Aerobatic aircraft also engage in many maneuvers with a high degree of side-slip, where yaw-roll coupling is undesirable. So one takes their weight saving$^2$, elliptical span loading tapered wing and yes, indeed, sweeps it forward a bit, eliminating the yaw-roll couple$^3$.
Aerobatic pilots want pitch, yaw, and roll effects to be separate and predictable, making advanced maneuvers, such as a knife-edge, 8 point roll, or inverted flight, much easier to fly.
$^1$ and providing more (T-D) excess thrust to climb
$^2$ also very helpful for aerobatics
$^3$ "mostly upright" planes, like the Cessna 172, can also do this by increasing area underneath the CG, making maneuvers, such as the forward slip, easier to fly. Some call this making it more "spirally unstable".
It's the easiest planform to build after a constant chord planform. Both have the spar at the 1/4 chord position along the entire wing but the plank planform has more area and mass than is optimal at the tips.
Any additional modifications to approach the theoretically ideal eliptical planform would start to require things like curved edges or spars that do not always sit at the 1/4 chord.