Roof and crawlspace vents are required by most building codes, which specify the vent openings. The function of the vents is to remove excess moisture from those spaces. Moisture can enter the crawlspace from the soil or through the foundation wall from the surrounding landscape. It can also enter the attic space from roof leak or through the ceiling in the living space of the house. If too much moisture accumulates, then fungi can grow leading to mold or decay.
In crawlspaces, cross-ventilation is called for (meaning that ideally, vents will be present on all sides of the crawlspace), however, if your house is built on a concrete slab, or over a basement, you won't have crawlspace vents.
Attics will usually have both inlet and outlet vents. Inlet vents, such as in soffits (eaves) are usually located on the lower portion of the roof.

Crawlspace vents are positioned at different locations along the perimeter wall.
Several types of vents are used to ventilate attic spaces, including:

A 'strip vent,' which is commonly found in boxed-in eaves.

A through-roof ( or 'eye-brow') vent, usually located near the ridge (or peak) of the roof.
A gable-end vent, usually located just below the ridge of the roof.

A ridge vent (as seen from the side of the roof) that is found along the entire ridge of the roof. Baffles along the front edges of the vent keep rain from entering and provide for a negative pressure region that helps pull air out of the attic.
Vents: Potential Problems
Evidence from recent wildfires in the West has shown that vents are an easy entry point for burning embers and (not surprising) flames. Embers can 'rain' on and around homes for hours before the wildfire flame-front reaches your house. Embers that enter your attic can ignite construction materials and other items you may have stored there. Flames can also enter if embers ignite near-home vegetation or debris that has accumulated on a deck or in a corner.
Entry of burning embers has been problematic for attic vents in general, and soffit vents in particular. Also, locally generated embers and flame can enter vents, as shown below.

This plant immediately under the a vent (and next to a single pane window) could be a problem if it ignites.

Needles (debris) from near-by pine trees that have accumulated on the lower roof section could easily ignite from embers and subsequently exposure the gable-end vent to embers or flames.

This trellis vegetation could also expose the gable-end vent to embers or flames.
Ignited debris at the inlet to this through-roof vent could enter and ignite combustible materials in the attic.
Most vents incorporate a screen at the inlet. Most building codes stipulate a minimum mesh size of 1/4-inch to minimize plugging of vent holes and reduction in air movement. Smaller mesh screen is easier to plug up, whether by air borne debris, or as shown in the photograph below, being painted over during routine painting.

This fine-mesh screen is easily plugged by debris, or as shown in this photograph, by paint
Vents: Possible Solutions
Your options regarding vents in existing homes are
Because of code restrictions, 1/4-inch mesh screen is commonly used in vents. This points to conflict for building and fire code officials. While it is clear that 1/4-inch mesh cannot prevent entry of embers and flame during wildfires, if smaller screens become plugged, vents cannot operate as intended to remove excessive moisture. Smaller mesh screens might improve fire performance, but it is hard to say how much.
In some new construction, soffit vents are often being eliminated. In those cases, the inlet vent function is being performed by through-roof vents located in the lower region of the roof, or by placing a strip vent on the vertically oriented facia, as shown in the photographs below. If you select these courses of action, make sure the total vent area meets code requirements.

In this case, the soffit vent has been replaced by a through-roof vent located near the eave line of the roof.

In this case, the soffit vent has been replaced by a strip vent, located above the vertical facia board, and immediately below the gutter.
The new California Building Code that will affect new construction in designated wildland urban interface areas specifies that vents should resist the entry of embers. With time, vents that are designed to resist the entry of embers during wildfires, while still maintaining adequate air flow under normal wind conditions, will be commercially available. Standard test procedures are currently being developed that will provide a consistent way to evaluate the performance of these types of vents.
New home that incorporate unvented attic spaces into the design are currently available, and are being built in some locations. This construction option may be more widely available in the future, but shouldn't arbitrarily be implemented in existing homes because of moisture-related durability problems that would develop.