First, you need to know the Lewis definition for acids and bases, which identifies something as an acid or a base depending on how they behave in a chemical reaction.
Lewis acids are defined as electron pair acceptors, while Lewis bases are defined as electron paird donors.
Another term used for Lewis acids is electrophiles; something is said to be electrophilic if it is electron deficient. Lewis bases are called nucleophiles, which implies a surplus of electrons present.
Pi bonds act as nucleophiles in some cases because they can be viewed as electron-rich regions. In organic chemistry, pi bonds are a part of many functional groups which give organic molecules their reactivity.
Most of the pi bonds that are seen in organic chemistry are a part of the C-C and C-O double bonds, or of the C-C and C-N triple bonds.
Pi bonds can be easily broken during chemical reactions, their presence often causing the molecule to be a base and a nucleophile.
You can read a more detailed description on the reactivity of pi bonds here: