I know that fuel flow should decrease with altitude (air fuel ratio). Should fuel flow also decrease with weight (fuel burn off)?
Yes, the lighter you are the less N1 you need to maintain the cruise Mach at your cruise altitude. This will result in a lower fuel flow (at fixed environmental conditions, lower N1 always results in lower fuel flow).
The maximum climb N1 is however independent of weight (see below for details), therefore also fuel flow will be independent of weight during climb (but the resulting climb rate is different).
Is n1 kept constant? Does it decrease with weight? Is it unaffected by altitude?
The cruise N1 depends on both weight and altitude. The following table from the 737 NG QRH (Performance Inflight - Flight With Unreliable Airspeed) shows the target N1 values for various weights and altitudes:
As you can see, N1 goes up with weight and up with altitude. The maximum climb N1 has a more complicated behavior as function of altitude, as the following table from the 737 FCOMv1 (Performance Inflight - General) shows:
The last 3 columns all show climb at fixed Mach 0.78. The N1 usually goes up with altitude, but then slightly down again for the highest altitudes (this is because TAT goes down with altitude up to the tropopause, but stays constant above). The maximum climb N1 is independent of weight, but the actual weight will affect the resulting climb rate.
If it depends, then what systems (fadec?) or settings (rated/non-rated mode?) are responsible for setting the behavior.
For the Boeing 737, the required fuel flow to reach the target N1 is computed by the EEC (Electronic Engine Control, see also What are the differences between FADEC and EEC systems?). From the 737 NG FCOMv2 (7.20.5 Engine System Description):
Electronic Engine Control (EEC)
Each engine has a full authority digital EEC. Each EEC has two independent
control channels, with automatic channel transfer if the operating channel fails.
With each engine start or start attempt, the EEC alternates between control
channels. The EEC uses thrust lever inputs to automatically control forward and
reverse thrust. N1 is used by the EEC to set thrust in two control modes: normal
and alternate. Manual selection of the control mode can be made with the EEC
switches on engine panel.
The target N1 calculations are performed by the Flight Management Computer, but can be overridden by the pilot. From the FCOMv2 (11.32.2 Flight Management):
The autothrottle operates in response to flight crew mode control panel inputs or
to automatic FMC commands. Reference thrust can be selected on the N1 LIMIT
page. Automatic FMC autothrottle commands are made while VNAV is engaged.
The autothrottle system:
And further (11.41.28 FMC Takeoff and Climb):
N1 Limit Page
Normally, N1 limits are automatically specified. Pilot selection of other limits is allowed.
Pilot selection of a reduced climb mode does not change the automatic selection
for other phases of flight.
Pilot selected mode is automatically replaced by AUTO selection when the
autopilot next changes vertical mode.
The active thrust limit is used by the autopilot and is displayed on the thrust mode