Sun is a type of resource in the Plants vs. Zombies series that the player needs to build up their defenses (and zombies in I, Zombie). It is essential to create defenses against zombies. It falls from the sky (daytime levels only) and is produced by sun-producing plants. It is the plants' equivalent to brains.
During nighttime levels, sun is collected only through sun-producing plants, e.g. Sun-shroom, or sun-containing tombstones in Dark Ages.
Each plant costs a certain amount of sun to plant, limiting the number of plants you can place on the lawn at a time. Your planting is also limited by the recharge or the "cool-down" rate of the seed packets. Also, upgrade plants cannot be planted unless the plant of which they are an upgrade of has already been planted, even if you have enough sun for them. The only plants that do not cost sun to plant are the Puff-shroom, its aquatic counterpart the Sea-shroom, and Imitater versions of them; and in Plants vs. Zombies 2 also includes Iceberg Lettuce, Grave Buster, Hot Potato, the first Tile Turnip you plant, Stallia and Gold Bloom.
Sun is obtained from sun-producing plants, such as the Sunflower, Twin Sunflower, and Sun-shroom and falls from the sky every ten seconds when it is day-time. Sun Bean also has sun producing effects but despite the other sun producing plants, it does not directly produce sun. Sun Bean causes the zombie that has eaten it to burst out tiny sun for every damage it takes. Toadstool acts differently too, with it producing sun after consuming a zombie. The player starts every ordinary level with 50 sun, which is enough for one Sunflower. During the Night, Fog, and Dark Ages levels, sun-producers are the only way to obtain sun, so some of these plants must be planted to obtain more than the starting 50 sun. Sunflowers produce a normal sun, Twin Sunflowers produce two normal sun, and Sun-shrooms produce small sun until they grow, after which they produce normal sun, growing once more to produce big sun in Plants vs. Zombies 2. Additionally, in Whack a Zombie, Zombiquarium, and Last Stand, zombies can drop sun.
The player cannot obtain any sun in these levels. Instead, they are supplied with plants that come up from a conveyor belt, which do not cost any sun.
Produced by Sunflower, Twin Sunflower (in groups of two), by Sun-shroom grown to middle size, a Toadstool swallowing a zombie, a Moonflower powered by one or three (two sun are given at once) shadow plants next to it, or a Gold Tile.
Falls from the sky in every world except for Dark Ages.
It is worth 50 sun.
It can also appear after digging up some plants with the Shovel refund upgrade.
Produced by small Sun-shroom, Moonflower by default, or Gold Bloom
It is worth 25 sun.
Produced by a fully grown Sun-shroom, a Primal Sunflower, a Moonflower powered by two shadow plants next to it, and Gold Bloom
It is worth 75 sun.
Produced when a zombie that has eaten a Sun Bean takes damage, usually in large groups.
It is worth five sun.
It can also be produced by shoveling some plants with the Shovel refund upgrade, providing 25-75% of the plant's original sun cost. The maximum amount of sun refund possible without purchasing with real money is 50%, and an additional 25% is available for USD $3.99.
Free plants will never drop tiny sun, as they do not cost any sun to plant, and plants before Last Stand waves are started will instead reward 100% of the original cost, regardless of already existent sun refunds.
Sun bombs fall from the sky in Sun Bombs. They are purple until they touch the ground, after then it reverts to normal sun. If the sun bomb is tapped while it is still purple, any plants or zombies nearby will take damage and the player will not be given any sun. In the Chinese version, it is worth 50 sun.
In Survival: Endless, the sun cost of each upgrade plant will increase by 50 for every one of those planted. For example, the player's first Cattail will cost 225 Sun, but their second Cattail will cost 275 Sun.
Seeing Stars is a good way to max out the player's sun. If the player uses Garlic and Spikeweeds, along with a couple of Threepeaters, they can have all of the incoming zombies dying automatically with minimal effort, only needing to replenish a Garlic in the middle row. The rest of the empty squares can be filled with Sunflowers and they can collect sun without worrying about being overrun.
However, in the Far Future trailer of Plants vs. Zombies 2, Tile Turnip's cost was 64000 sun. It is impossible for the player to do so without hacking. The maximum sun the player can collect is 9900, but Tile Turnip needs to be planted with 16000 sun before the sun cost doubles twice to 64000.
This is probably because when PopCap is testing new plants, they have a developer mode that gives them infinite sun, no recharge and unlimited Plant Food.
But in the Chinese version you can achieve that sun cost, due to the new max sun amount increase, though it is very hard to accomplish.
In Plants vs. Zombies, Survival: Endless levels and Co-op Endless are the only levels where the cost of plants rises (the cost of upgrade plants rising for every one of each type currently planted on the lawn).
In Versus Mode, the zombie's currency is brains which works the same as sun. But in I, Zombie, players can collect sun by eating Sunflowers. That is peculiar since zombies need brains, not sun like plants. If the player digs up a plant, he or she does not get back the sun used to plant it.
In Last Stand puzzles and Last Stand in Plants vs. Zombies 2, the player can get back the sun cost of a plant (unless it is damaged).
Sun will not fall from the sky during Night, Fog, or Dark Ages levels.
The sun costs of non-free plants are multiples of 25.
In Chinese version, sun bombs are worth 50 sun.
Sun can be 3 colors. Regular sun is yellow, sun being stolen by Ra Zombie is red, and sun being stolen from Turquoise Skull Zombie is light blue.
Sun Bombs are purple, so technically, sun can be 4 colors.
Before the 1.8 update, Sun in the Chinese version was worth 25 whereas the international is worth 50, making the Chinese version harder.
Sun appears in the title screen of Peggle Nights, however it was way before Plants vs. Zombies was announced, this could have been a teaser for the game while it was early in development.