Why do we use a transformer on some heating element projects when the wattage is the same on both sides of the trasformer?
Power in a heater is given by the equation \$ P = VI \$ where P is power (watts), V the applied voltage (volts) and I the current (amps). You can see that there are multiple ways to achieve a given power - high voltage / low current - low voltage / high current.

For a transformer the relationship between input and output is given by \$ P_{in} = P_{out} \$ (ignoring the few percent losses in the transformer). From the previous formula we can write \$ V_{in}I_{in} = V_{out}I_{out} \$. This allows us to step the voltage up or down to meet the requirements of the load.


  ... but since the watts on both sides of the transformer are supposed to be identical, wouldn't the heating element dissipate the same energy with and without the transformer?


Yes, if the resistance of the wire is the same. A high voltage heater will use a very thin wire with high resistance. If this proves too fragile or too thin for the application then a thicker wire can be used but the current will have to increase to get the same current density in the wire. Since the wire is thicker it has a lower resistance so a lower voltage can be used too. An example is the butcher's bag sealing machine which uses an 'impulse' element nichrome (or similar) wire to seal the bag. Here a certain thickness of seal may be required and so a lower voltage, higher current is required. The transformer 'transforms' the voltage and current to match the heater and provides electrical isolation from the mains eliminating a shock hazard.