Answer
Internal energy is a state function because it depends on just the initial and final energies. Heat and work, however, depend on the path that is taken from the initial to final point.
Work Step by Step
A state function's value depends only on the state of the system-- the path taken there is irrelevant.