So there was one MCQ in our exam which made me delve into this. Does the transfer of thermal energy always refer to heat transfer? If we have resistance wires thrown inside a system and current passes through them , would that be considered as transfer of thermal energy by work? Because work is eventually transferred to the system as thermal energy dissipated in the wires.
Thermal energy is not, I think, a defined term in Thermodynamics. If the wires through which the current passes are considered part of the system, then the VIt is a work input to the system, but it's important to note that the work is done irreversibly and its effects are the same as those of a quantity VIt of heat entering the system! If the wires are not considered part of the system, then we have a straightforward transfer of heat into the system from the wires.
We need to get terminology straight. First, in thermodynamics, we normally refrain from using the term "thermal energy". If you look at the classic textbook Heat and Thermodynamics by Mark Zemansky, you won't find the term "thermal energy" used. It is too often confused with temperature, heat, and the non-kinetic energy component (i.e., potential energy) of internal energy. Thermal energy is not transferred. Only heat and work. In thermodynamics, the term "heat" refers to energy transfer due solely to temperature difference. The other form of energy transfer, work, is essentially due to force operating through distance (it could be mechanical forces, or in this case, due to the force the electric field exerts on the electrons in the wire).
When current passes through the resistance of a wire it raises the wire temperature due to work done by the electrical field. The transfer of energy from the now elevated temperature wire to the lower temperature surrounding materials or air is then in the form of heat. So, in effect, the transfer of energy from the electrical energy source (say battery) to the surroundings of the wire, involves both heat and work.
As to David's comment, radiant heat transfer is energy transfer by electromagnetic waves. It still requires a temperature difference. I don't believe light itself is considered "heat". Photons are not "heat". However a source of like (i.e. incandescent bulb) can cause heat transfer, due to its temperature. The heat transfer can be a combination ofconduction, convection, and radiation. The radiation component involves electromagnetic waves and needs no medium. The other modes require contact with solids or fluids.