Does performing a measurement on a system change its internal energy? I'm studying Quantum Mechanics in my spare time from a general point of view (no technical details) so some fundamental question came into my mind:
How is it possible to detect a single photon without making any change to it?
How does observation is related to the total energy of a system and does the act of performing measurement alter the internal energy of the observed system as a general rule?
 A: 
How is it possible to detect a single photon without making any change to it?

In general, if you have detected a photon in your experimental apparatus, you have changed it drastically. It may have disappeared completely, as in this bubble chamber picture:
 
The colored diagram shows the photon in the picture that has materialized into an electron positron pair. How to we know there was a photon( the yellow line) when it does not leave a trace in the chamber? Because we know that it started from an electron interacting with the liquid in the chamber: the curly bit is the electron that has given most of its energy to the photon.
In general in particle physics if you detect a particle, you have disturbed it, except if you detect it as a missing energy and momentum and can thus identify its mass.

How does observation is related to the total energy of a system and does the act of performing measurement alter the internal energy of the observed system as a general rule?

It depends on what you count as total energy. Energy is conserved, it just changes phases. Subsystems give up energy or absorb the energy of the photon, as in the picture: the pair production took energy, that the photon gave up. The electron interacting with matter lost energy giving it to the photon.

And what about measurement in macroscopic scales; Can a measurement to a close system be without any consequences?

In a closed system whether classical or quantum mechanical, energy is conserved. Different equations for the conservation are necessary for the two regimes.
A: The act of measurement causes a quantum system to collapse into an eigenstate of the operator associated with the measurement. So unless the photon wave function is in an eigenstate of the detection operator, it will be changed.
Unless a system is in an eigenstate of the hamiltonian it will not have a definite energy. If one measures the energy of the system, the wave function will collapse into a definite energy state.
