Sun

Sun is the resource players need to build their plants, which makes it essential to create defenses against zombies. It falls from the sky (daytime areas only) and is produced by specific plants.

How to Use It
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 "cooldown" rate of the seed packets. Also, upgrade plants cannot be planted unless the plant of which they are an upgrade of have 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 cousin the Sea-shroom, and Imitater versions of them.

How to Obtain It
Sun is obtained from Sun-producing plants, such as the Sunflower, Twin Sunflower and Sun-shroom, in addition to the player starting every ordinary level with 50 Sun. That's important, as that's the sun cost of the primary sun-producing plant, the Sunflower. Sun also falls from the sky in the daytime areas Day, Pool, and Roof. During the Night and Fog 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 25 Sun, Twin Sunflowers produce two 25-value sun which is 50 sun together, and Sun-shrooms produce 15 sun until they grow, after which they produce 25 sun. Sun can also be obtained when it is daytime. Sun falls every 10 seconds. Aditionally, in Whack a Zombie, Zombiquarium, and Last Stand, zombies can drop sun.

Conveyor-belt Levels
The player cannot obtain any sun in these levels. Instead, they are supplied with plants that come up from a conveyor belt.

Normal Sun
Normal Sun gives you 25 sun. It is the most common form of sun. It is given by all plants and it falls from the sky in most game modes.

Small Sun
Small Sun is given to you from Sun-shrooms until they grow more. They are worth 15 sun. It looks like a smaller version of regular sun. If you plant ten Sun-shrooms and collect all of the sun until they grow big, you will soon end up with a sun value that is a multiple of 25.

Big Sun
Big Sun falls from the sky in Sunny Day. It is worth 50 sun each. It looks like a larger version of normal sun.

Sun cost
In Survival: Endless, the Sun cost of each Upgrade Plant (Gatling Pea, Twin Sunflower, Gloom-shroom, Cattail, Winter Melon, Gold Magnet, Spikerock and Cob Cannon) will increase by 50 for every one of those planted. For example, your first Cattail will cost 225 Sun, but your second Cattail will cost 275 Sun.

Trivia

 * The maximum amount of sun you can get in Plants vs. Zombies is 9990, or if you have Cheat engine or PvZ trainers, they appear 99999 sun. Any sun collected after this figure is achieved will not be added; however, new plants consume sun and decrease the available amount below 9990 (after which more sun can be gained again until the limit is eventually reached once more, etc).
 * This, along with the 15 sun increments from small Sun-shroom, is the only way to get sun that is not in multiples of 25.
 * The mini-game Seeing Stars is another good one for getting this. If you use Garlic and Spikeweeds, along with a couple of Threepeaters, you 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 you can collect sun without worrying about being overrun.
 * 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, it works the same as sun.
 * But in I, Zombie, you can collect Sun by eating Sunflowers. That's peculiar since zombies need brains, not Sun like plants. Maybe it has to do that if only one currency is used it will be Sun.
 * The Almanac says that Sunflower bounces (or sways) to a beat that only it can feel. But if you have multiple Sunflowers they will be un-synced. This is probably because only a certain Sunflower feels a certain beat, so each Sunflower feSunny_Day.jpg another beat and they become un-synced.
 * If you dig up a plant, you don't get back the sun you used to plant it.
 * That's why you have to be careful in Last Stand, due to how you only have limited sun and cannot gain more.
 * In Last Stand puzzles, you can get back the sun cost of a plant (unless it is damaged).
 * Sun won't fall from the sky during the Night or Fog levels. That is why it is risky and practically suicide (Exception is on 2-1) to not use Sunflowers or Sun-shrooms.
 * There is Big Sun, which produce 50 Sun, this kind of sun will only appear falling from the sky only on Sunny Day Cancelled Mini-game.