The Sun's role in games can vary. In most games, it only exist to differentiate day from night. Sometimes, the sun's existence in a game is understood, other times, the sun is actually drawn in. As the earth rotates, the Sun's light can sometimes have a different appearance. This is typically seen in games with a Day/Night cycle, and is most pronounced at sunset. The sun is commonly portrayed as the giver of life. It is usually seen as the opposite of the moon.
Games featuring / using the Sun in peculiar ways
Super Mario Bros. 3 has an antagonistic Sun known as Angry Sun that chases after players, in an attempt to kill them.
Plants Vs. Zombies uses "Sun" as a currency for purchasing more plants to defend against zombies. Plants such as sunflowers, and sun-shrooms produce their own sun in the game.
Boktai: The Sun is in Your Hand uses the Sun in an unique way. The cartridge has a solar sensor on it. Sunlight is required to charge the Gun Del Sol. This is done by placing the solar sensor in direct sunlight.
Lunar Knights, also known as Boktai DS, features a character able to harness the power of the sun. Unlike Boktai, however, Lunar Knights does not come with a built-in solar sensor and instead focuses on an automated day/night system.
Noby Noby Boy features an anthropomorphic Sun that reports BOY's length to GIRL.
Spore has the Sun and all of the planets appear as a easter egg.
Shin Megami Tensei: DIgital Devil Saga 2 features the Sun as a dungeon.
Games featuring mythological views on the Sun
The God of War franchise , being steeped in Greek mythology, features Helios, the Greek God of the Sun.
In Scribblenauts, Ra, the Egyptian God of the Sun, can be summoned.
Forgotten Worlds uses Ra as a boss. It is called God Rah.