No, the Sun can influence the Earth's climate, but it isn't responsible for the warming trend which we see over recent decades.
Global warming is said to be the increase in the average temperature of the Earth’s surface.
Causes of the global warming:
Global warming occurs as a result of increased concentration of greenhouse gases in the atmosphere.
Greenhouse gases include carbon dioxide, methane, and the water vapour. These gases generally trap solar radiations released back by Earth. This helps in keeping our planet warm and thus, helps in the human survival.
However, increase in amount of greenhouse gases can also lead to an excessive increase in the Earth’s temperature, leading to the global warming.
Global warming is a result of industrialization, burning of fossil fuels, and the continued deforestation.