You absolutely can freeze basil, but you won't end up with beautiful bright green leaves.
How to Freeze Basil: To preserve some of the appealing green color when freezing whole leaves, steam them, pat dry and freeze in a single layer on a baking sheet. Once frozen, the leaves can be transferred to a freezer bag (get as much air out of the bag as possible) and stored for about 6 months.
My preferred method for freezing garden fresh basil is this: Puree the basil in the food processor with just a little extra virgin olive oil: about 2 tablespoons to 1 – 1 1/2 cups of basil. Spoon the puree into ice cube trays to freeze. Once frozen, transfer the cubes to a freezer bag. The cubes maintain their flavor longer than the individual frozen leaves.
For more tips and recipes for basil, see 7 Ways with Fresh Basil.
Want to learn how to make basil pesto? Here's an easy way to do it: