Sun is the main fuel in Plants Vs. Zombies for DS (and DSiWare). The player needs it to plant plants that will kill zombies with the only execptions are puff-shroom and Sea-shroom which are the only 2 plants that don't cost sun. The most amount of sun the player can have is 9990. No sun will be given in conveyor belt levels because the player can get plants off of a conveyor belt.
The player uses sun just by draging the plant where they want it. After the player places the plant, the amount of sun the plant cost (which can be seen on the seed packet) will be subtracted from the total.